Opened 9 years ago

Closed 9 years ago

#12747 closed Bug (fixed)

IE: Dropdowns become disabled when in maximize mode.

Reported by: Jakub Ś Owned by: Artur Delura
Priority: Normal Milestone: CKEditor 4.4.7
Component: General Version: 4.0
Keywords: IE Cc:

Description

  1. Open replacebycode.html sample
  2. Click Maximize
  3. Select header and part of first sentence in first paragraph as shown below:
    [Apollo 11
    
    Apollo 11 was the spaceflight that landed ] the first humans,...
    
  4. Click and hold mouse button for a few seconds on Styles or Format dropdown.

Result: Dropdown becomes disabled.

Problem can be reproduced in IE8-10 from CKEditor 4.0.

Change History (9)

comment:1 Changed 9 years ago by Jakub Ś

Status: newconfirmed

comment:2 Changed 9 years ago by Artur Delura

Owner: set to Artur Delura
Status: confirmedassigned

comment:3 Changed 9 years ago by Artur Delura

Here top style is set with wrong value.

The above happens because this returns a weird big value.

And again the above happens because here

  • quirks = false
  • $docElem.scrollTop = 0
  • body.$.scrollTop = 1633

So we end up with 1633 but should be 0.

Last edited 9 years ago by Piotrek Koszuliński (previous) (diff)

comment:4 Changed 9 years ago by Artur Delura

As we can see above body.$.scrollTop returns 1633, but actually scroll is 0. This is some ugly browser bug which was removed in IE11. Which is result of mixing various cases like setting some styles to main editable area (maximize plugin) and playing with selection.

What is wrong in CKEditor code is this:

y = box.top + ( !quirks && $docElem.scrollTop || body.$.scrollTop );

When $docElem.scrollTop is 0 and we are not in quirks mode it pick value which is ment to be used only in quirks. To fix this issue I did this:

y = box.top + ( quirks ? body.$.scrollTop : $docElem.scrollTop );

comment:5 Changed 9 years ago by Artur Delura

Current changes in branch:t/12747. I can't reproduce issue in manual tests.

Version 0, edited 9 years ago by Artur Delura (next)

comment:6 Changed 9 years ago by Artur Delura

Status: assignedreview

comment:7 in reply to:  4 Changed 9 years ago by Piotrek Koszuliński

Replying to a.delura:

As we can see above body.$.scrollTop returns 1633, but actually scroll is 0. This is some ugly browser bug which was removed in IE11. Which is result of mixing various cases like setting some styles to main editable area (maximize plugin) and playing with selection.

What is wrong in CKEditor code is this:

y = box.top + ( !quirks && $docElem.scrollTop || body.$.scrollTop );

When $docElem.scrollTop is 0 and we are not in quirks mode it pick value which is ment to be used only in quirks. To fix this issue I did this:

y = box.top + ( quirks ? body.$.scrollTop : $docElem.scrollTop );

It reminded me about https://github.com/ckeditor/ckeditor-dev/commit/056c66574aa7d555cf03dc372fb91ae2c48c5458 :D

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

Milestone: CKEditor 4.4.7
Status: reviewreview_passed

Great job with the patch. I only needed to improve the test, because many times I couldn't reproduce the issue. It turned out that the selection must be made in a specific way.

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

Resolution: fixed
Status: review_passedclosed

Fixed on master with git:69263d0.

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