[Webkit-unassigned] [Bug 39978] spellcheck="false" not respected in designMode

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 7 14:26:08 PDT 2010


Ryosuke Niwa <rniwa at webkit.org> changed:

           What    |Removed                     |Added
           Platform|PC                          |Macintosh Intel
           Keywords|                            |EasyFix, HasReduction
           Severity|Normal                      |Minor
           Priority|P2                          |P4

--- Comment #2 from Ryosuke Niwa <rniwa at webkit.org>  2010-10-07 14:26:08 PST ---
(In reply to comment #1)
> As per spec, designMode="on" should be equivalent to setting contentEditable on the body. So, I think the focus being on the HTML element is incorrect. To clarify, the body element is focused for the first mouseDown, but the HTML element is focused at the second mousedown. That definitely looks like a bug.

In SelectionController::setFocusedNodeIfNeeded, I see the target pointing at html element in your test case.  This is probably a bug in Node::isFocusable().  The following change seems to fix this bug:

Index: WebCore/dom/Node.cpp
--- WebCore/dom/Node.cpp    (revision 69327)
+++ WebCore/dom/Node.cpp    (working copy)
@@ -776,9 +776,10 @@

 bool Node::isFocusable() const
-    if (!inDocument() || !supportsFocus())
+    bool isBodyInDesignMode = document() && document()->inDesignMode() && hasTagName(bodyTag);
+    if (!inDocument() || (!supportsFocus() && !isBodyInDesignMode))
         return false;
     if (renderer())

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list