Opened 10 years ago

Last modified 8 years ago

#11111 confirmed Bug

Range.enlarge test failing in Safari 7.0 and Chrome 37

Reported by: Olek Nowodziński Owned by:
Priority: Normal Milestone:
Component: General Version: 4.0
Keywords: Cc:

Description (last modified by Piotrek Koszuliński)

Test /dt/core/dom/range/enlarge.html#test_enlarge_element12 fails in latest Safari 7.0 that comes with OSX 10.9. It's also reproducible in Chrome 37 (see #12221).

The root of the problem is the following condition: https://github.com/ckeditor/ckeditor-dev/blob/major/core/dom/range.js#L1039

In this case sibling is empty <b></b> (<p>Test <i><b></b>[Enlarge]</i></p>). Unlike previous versions, Safari 7 considers sibling.$.offsetWidth to be 1 at that point, while in other browsers it is 0. So the conclusion is that empty elements may have some width, which seems to be a regression in browser's engine.

That particular test fails since CKeditor 4.0 in Safari 7 which makes it clear that we're facing Safari regression.

Related bug in Chrome: #12221.

Attachments (1)

emptyOffsetWidth.html (448 bytes) - added by Olek Nowodziński 10 years ago.
Sample to reproduce the issue without editor

Download all attachments as: .zip

Change History (8)

comment:1 Changed 10 years ago by Olek Nowodziński

Version 0, edited 10 years ago by Olek Nowodziński (next)

Changed 10 years ago by Olek Nowodziński

Attachment: emptyOffsetWidth.html added

Sample to reproduce the issue without editor

comment:2 Changed 10 years ago by Olek Nowodziński

I pushed a commit to major (7d732b3) that marks that particular test as a regression in Safari.

comment:3 Changed 10 years ago by Piotrek Koszuliński

cc

comment:4 Changed 10 years ago by Piotrek Koszuliński

Description: modified (diff)
Status: newconfirmed
Summary: [Safari] Range.enlarge test failing in Safari 7.0[Safari] Range.enlarge test failing in Safari 7.0 and Chrome 37

The same regression made up to Chrome - #12221.

comment:5 Changed 10 years ago by Piotrek Koszuliński

I pushed git:b46bd06 with a workaround. It seems that the patch will not be provided soon.

comment:6 Changed 10 years ago by Piotrek Koszuliński

Summary: [Safari] Range.enlarge test failing in Safari 7.0 and Chrome 37Range.enlarge test failing in Safari 7.0 and Chrome 37

comment:7 Changed 8 years ago by Marek Lewandowski

Chrome team claims to have this issue fixed https://bugs.chromium.org/p/chromium/issues/detail?id=395136#c14. Wondering how long will it take for WebKit team to fix it.

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