[Webkit-unassigned] [Bug 40338] display:none element should not retain focus
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Sep 14 20:04:20 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=40338
Ryosuke Niwa <rniwa at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #107039|review? |review-
Flag| |
--- Comment #13 from Ryosuke Niwa <rniwa at webkit.org> 2011-09-14 20:04:20 PST ---
(From update of attachment 107039)
View in context: https://bugs.webkit.org/attachment.cgi?id=107039&action=review
> Source/WebCore/ChangeLog:8
> + When elements gets hidden its renderer gets drop, such element should
the word hidden makes me think of visibility: hidden. Should we remove focus in that case as well? If so, we need a test for that.
> Source/WebCore/page/FrameView.cpp:2212
> + // As HTMLAreaElement doesn't have renderer() we dont want to set focus to 0.
Is this tested somewhere?
> LayoutTests/ChangeLog:8
> + Added test case to check the behavior.
"check the behavior" is too general.
> LayoutTests/fast/events/remove-focus-on-hidden-elelment.html:4
> +
Why do we need this line?
> LayoutTests/fast/events/remove-focus-on-hidden-elelment.html:12
> +if (window.layoutTestController) {
> + layoutTestController.dumpAsText();
> +}
No curly brackets around a single line statement.
> LayoutTests/fast/events/remove-focus-on-hidden-elelment.html:28
> +testArea.addEventListener('keydown', function (event) { keycount++ ;});
> +
> +testArea.style.display = 'none';
> +
> +// Send keyboard event
> +eventSender.keyDown("A");
> +
> +logResult(keycount ? "FAIL" : "PASS");
> +
> +function logResult(str) {
> + document.getElementById('result').innerHTML = str;
> +}
Why do we check that the node no longer retain focus by counting keydown event? It seems like we should directly check focused property.
--
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