New issue
Advanced search Search tips

Issue 586200 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Tab focus navigation should not break on hidden SVG

Reported by rodneyr...@gmail.com, Feb 11 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2646.0 Safari/537.36

Example URL:
http://jsbin.com/dusoharuyu/1/edit?html,output

Steps to reproduce the problem:
1. create an <input>, an <svg> with <a xlink:href="">, another <input>
2. hide <svg> using display:none
3. focus first <input>
4. press Tab key

What is the expected behavior?
focus should advance to second input

What went wrong?
focus is stuck on first input

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? N/A 

Does this work in other browsers? Yes 

Chrome version: 50.0.2646.0  Channel: canary
OS Version: OS X 10.10.5
Flash Version: Shockwave Flash 21.0 r0

WebKit bug for reference: https://bugs.webkit.org/show_bug.cgi?id=154114

 
Labels: -Cr-Blink -OS-Mac Cr-Blink-SVG Cr-Blink-Focus
Labels: Needs-Bisect M-50
Owner: pbomm...@chromium.org
Status: Assigned
Able to reproduce the issue on Windows 7/10 with latest Chrome Canary i.e., 50.0.2646.0, Working on bisect will update the bisect result soon.

Comment 3 by pdr@chromium.org, Feb 11 2016

Labels: -Needs-Bisect
Owner: ----
Status: Available
Likely a bug in how we handle focus of display:none elements.

Comment 4 by f...@opera.com, Feb 15 2016

Owner: f...@opera.com
Status: Assigned
Project Member

Comment 5 by bugdroid1@chromium.org, Feb 17 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ad66827206bf24e41a4afa7dd7c3083157506c6c

commit ad66827206bf24e41a4afa7dd7c3083157506c6c
Author: fs <fs@opera.com>
Date: Tue Feb 16 23:59:43 2016

Consider focusability even when tabs-to-links is enabled for <svg:a>

SVGAElement::isKeyboardFocusable could end up returning 'true' even when
the element wasn't focusable (because it had "display: none" and hence
no LayoutObject) because the value of the 'tabsToLinks' setting would be
returned without further checks. Because it wasn't focusable
setFocusedElement would not do anything, and focus would remain where it
was previously.
Make sure the focusable check is considered in this case. This makes the
SVGAElement version of this code look the same as the HTMLAnchorElement
version.

BUG= 586200 

Review URL: https://codereview.chromium.org/1700833003

Cr-Commit-Position: refs/heads/master@{#375713}

[add] http://crrev.com/ad66827206bf24e41a4afa7dd7c3083157506c6c/third_party/WebKit/LayoutTests/svg/custom/display-none-a-does-not-stop-focus-navigation.html
[modify] http://crrev.com/ad66827206bf24e41a4afa7dd7c3083157506c6c/third_party/WebKit/Source/core/svg/SVGAElement.cpp

Comment 6 by pdr@chromium.org, Feb 17 2016

Status: Fixed
Components: Blink>HTML>Focus
Components: -Blink>Focus

Sign in to add a comment