Bug 55861

Summary: IFrame is getting the focus even though it is hidden
Product: WebKit Reporter: satya <satyacbit>
Component: DOMAssignee: Erik Arvidsson <arv>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, arv, commit-queue, dglazkov, mnissler, ojan
Priority: P2 Keywords: HasReduction
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Hidden frame getting the focus
none
Simpler test case
none
Patch none

Description satya 2011-03-07 01:15:53 PST
Created attachment 84925 [details]
Hidden frame getting the focus

I have used an Iframe, which will is hidden ie style="display:none". But when I am using the tab to move the focus to next control, the hidden frame is getting the focus. So, I need to tab again to get the focus on the element. If I have more hidden IFrames, then almost it behaves like the focus was lost.

Please use the attached files to reproduce the issues.
Steps to reproduce:
1. Unzip the attachment
2. Make sure the src of the IFrame in the focusTest.htm is hiddenpage.htm
3. Open the page focusTest.htm
4. Put the focus on first input and use tab to move the focus.
5. Second input will get the focus but the third input input will not get the focus. Extra tab is required to get the focus on it.

It was working fine all other browsers.
Comment 1 Mattias Nissler 2011-04-05 02:17:07 PDT
Confirmed on chrome 12 dev:

Google Chrome	12.0.712.0 (Official Build 79102) dev
WebKit	534.27 (trunk@81703)
V8	3.2.3.1
User Agent	Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.27 (KHTML, like Gecko) Chrome/12.0.712.0 Safari/534.27
Command Line	 /opt/google/chrome/google-chrome --user-data-dir=/home/mnissler/.config/chrome_chromium --flag-switches-begin --flag-switches-end
Comment 2 Mattias Nissler 2011-04-05 02:19:34 PDT
Note that this also affects the case when an iframe gets hidden while an element within that iframe is focused, at which point the focused element should lose focus, but doesn't.
Comment 3 Erik Arvidsson 2011-04-05 11:03:56 PDT
Created attachment 88280 [details]
Simpler test case
Comment 4 Erik Arvidsson 2011-04-05 12:37:49 PDT
Created attachment 88294 [details]
Patch
Comment 5 Erik Arvidsson 2011-04-08 12:33:22 PDT
Adding some reviewers...
Comment 6 Dimitri Glazkov (Google) 2011-04-08 12:57:58 PDT
Comment on attachment 88294 [details]
Patch

ooh, this is good.
Comment 7 WebKit Commit Bot 2011-04-08 16:37:50 PDT
Comment on attachment 88294 [details]
Patch

Clearing flags on attachment: 88294

Committed r83356: <http://trac.webkit.org/changeset/83356>
Comment 8 WebKit Commit Bot 2011-04-08 16:37:55 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 satya 2011-04-10 22:42:55 PDT
In which chrome and safari version we can get the fix available???