Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#12788 closed Bug (duplicate)

Invalid dropdown positioning when screen is scrolled

Reported by: Marek Lewandowski Owned by: Artur Delura
Priority: Normal Milestone: CKEditor 4.4.7
Component: General Version: 4.4.7
Keywords: Cc:

Description

If you have a page with a longer content than your screen height, editors below "one screen height" will have dropdowns mispositioned.

  1. Open any sample with CKEditor. (i.e. samples/replacebyclass.html)
  2. Evaluate following code:
    ( function() {
    	// Increase description block height.
    	document.querySelector('.description').style.height = '3000px';
    	// Scroll down, lemme do it for you.
    	window.scrollTo(0,document.body.scrollHeight);
    }() );
    
  3. Click font size dropdown.

As far as I've tested only Blink browsers seems to be affected by this issue (Chromium, Chrome, Opera). FF and IE8 were fine, don't know how about Safari.

This is a regress introduced in t/12747 git:5875b0cf0bd145156a25d60e4a4ae9afb543916b (not yet published).

Change History (7)

comment:1 Changed 9 years ago by Marek Lewandowski

It would be also nice to check if Safari is also affected, to know what tag should land in the title, but I don't have a mac right now by my hand.

comment:2 Changed 9 years ago by Jakub Ś

Status: newconfirmed
Version: 4.4.7 (GitHub - master)

Problem can be reproduced in Blink and Webkit browsers. In case of Webkit, I was able to reproduce this issue on Safari 7.0.6 (don't have anything newer) but not in Safari 5.1 (Windows).

comment:3 Changed 9 years ago by Jakub Ś

This is a recent regression introduced by #12747.

comment:4 Changed 9 years ago by Artur Delura

Owner: set to Artur Delura
Status: confirmedassigned

comment:5 Changed 9 years ago by Artur Delura

I made an experiment and created a file with scroll and also iframe with scroll, and checked to which elements body or html are set information about scrolling scrollLeft and scrollTop. I checked all abowsers (including quirks but compability mode only IE8). Results are various sometimes scroll information are set to html sometimes to body and to both. What is obvious is that at least in one element information is stored. So I just simplify getting scroll information by following code.

var scrollLeft = ( $docElem.scrollLeft || body.$.scrollLeft ),
    scrollTop = ( $docElem.scrollTop || body.$.scrollTop );

We don't need check whether we are in quirks mode.

I could write manual tests for this, because it's unreproducible.

comment:6 Changed 9 years ago by Artur Delura

Status: assignedreview

Changes in branch:t/12788.

comment:7 Changed 9 years ago by Piotrek Koszuliński

Resolution: duplicate
Status: reviewclosed

Another DUP of #12758. Please work on this issue there.

Last edited 9 years ago by Piotrek Koszuliński (previous) (diff)
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy