Bug 133371
Summary: | Element.isContentEditable should return true in hidden elements | ||
---|---|---|---|
Product: | WebKit | Reporter: | Piotrek Koszuliński (Reinmar) <pkoszulinski> |
Component: | HTML Editing | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | aleksander, ap, enrica, kling, koivisto, man.zhong, rniwa |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Piotrek Koszuliński (Reinmar)
Identical issue was reported for Blink: https://code.google.com/p/chromium/issues/detail?id=313082
It was confirmed after Anne van Kesteren commented that spec does not suggest that isContentEditable depends on synchronous style resolution.
> Example URL:
> http://jsfiddle.net/kNNzK/5/
>
> Steps to reproduce the problem:
> 1. Create a hidden element
> 2. Add a child element with contenteditable="true"
> 3. Query child element isContentEditable
>
> What is the expected behavior?
> Return true
>
> What went wrong?
> Returned false
Reproduced it on Safari 7.0.3.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Piotrek Koszuliński (Reinmar)
This issue causes CKEditor to initialize in read only mode if initialization happened in hidden container. This is a common case for SPAs.
Of course it can be workaround by getAttribute('contenteditable') and DOM traversing, but it's hard to control whether editor is visible when reading isContentEditable. And switching to deoptimised version is not good option, because we use this check very often.
Related ticket: http://dev.ckeditor.com/ticket/9814
cyndi
checked on WebKit-EFL, can't repro this issue.
Ryosuke Niwa
Doesn't reproduce on the latest nightly builds of WebKit either. It's probably fixed by http://trac.webkit.org/changeset/160966.
Piotrek Koszuliński (Reinmar)
In which version of Safari that commit will be included? I can still reproduce this issue on Safari 7.0.4.
Alexey Proskuryakov
Please test with a nightly build from <http://nightly.webkit.org>. We never discuss future Apple releases.
Ryosuke Niwa
Confirmed that this bug has been fixed by r160966.