Last Comment Bug 644452 - Focus not set when switching to cached document with back or forward if anything other than the document was last focused
: Focus not set when switching to cached document with back or forward if anyth...
Status: VERIFIED FIXED
: access, regression
Product: Core
Classification: Components
Component: Disability Access APIs (show other bugs)
: Trunk
: x86 Windows 7
: -- normal (vote)
: mozilla10
Assigned To: alexander :surkov
:
:
Mentors:
Depends on: 673958
Blocks: focuseventa11y a11ynext 659863
  Show dependency treegraph
 
Reported: 2011-03-23 19:43 PDT by James Teh [:Jamie]
Modified: 2011-09-29 07:58 PDT (History)
4 users (show)
surkov.alexander: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description James Teh [:Jamie] 2011-03-23 19:43:15 PDT
When using the back or forward commands to switch to a cached document, if anything other than the document itself was last focused in that document, no focus event is fired and the focused state is not set.

Str:
1. Open Firefox 4.
2. Open http://google.com/cow/
3. Ensure that focus remains on the document. This can be done by pressing control+k and then tab.
4. Open http://apache.org/cow/
5. Press alt+leftArrow to go back to the document opened in step 2.
Result (correct): A focus event is fired and the focused state is set on the document.

6. Tab to the link.
7. Open http://apache.org/cow/
8. Press alt+leftArrow to go back to the document opened in step 5.
Expected: A focus event should be fired (and the focused state should be set) on the link focused in step 3, or at the very least, the document itself.
Actual: No focus event is fired and the focused state is not set anywhere.

Regression from Firefox 3.6.

This is very annoying for NVDA (and probably other screen reader) users, as pressing back or forward in these cases appears to do nothing and causes current focus to break. Users must press tab or similar to access the new document. However, some users may not be aware of this work around.

Tested with Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b13pre) Gecko/20110322 Firefox/4.0b13pre
Comment 1 alexander :surkov 2011-06-29 01:58:39 PDT
Enn, any idea why the DOM focus event isn't fired when you do forwrad/backward navigation? It doesn't sound like correct behavior.
Comment 2 Neil Deakin (away until Oct 3) 2011-06-29 07:34:40 PDT
The focus event fires when I run the steps above. After step 8, the link on google.com/cow is focused and both the document and content received focus events.
Comment 3 alexander :surkov 2011-07-01 01:36:24 PDT
(In reply to comment #2)
> The focus event fires when I run the steps above. After step 8, the link on
> google.com/cow is focused and both the document and content received focus
> events.

How do you listen events? I add focus event listener on document node of Firefox window (http://mxr.mozilla.org/mozilla-central/source/accessible/src/base/nsRootAccessible.cpp#264), it doesn't trigger if I do (sure, a11y should be running):

1) click addressbar and open http://google.com/cow/, tab to google link
2) click addressbar and open http://apache.org/cow/
3) press alt+left and I don't see that event listener triggers
Comment 4 Neil Deakin (away until Oct 3) 2011-07-06 04:55:55 PDT
I logged which events the focus manager is firing. I also tried adding a focus/blur listeners to browser.js and see the events firing.

Step 1:

Focus on: chrome://browser/content/browser.xul
Blur on: chrome://browser/content/browser.xul
Focus on: about:blank
Focus on: http://www.google.com/cow

Step 2:

Blur on: http://www.google.com/cow
Focus on: chrome://browser/content/browser.xul
Blur on: chrome://browser/content/browser.xul
Focus on: http://www.google.com/cow
Focus on: http://apache.org/cow

Step 3:

Focus on: http://www.google.com/cow
Comment 5 James Teh [:Jamie] 2011-09-26 18:55:11 PDT
I verified that this is fixed in the last try build for bug 673958.
Comment 6 alexander :surkov 2011-09-28 02:25:41 PDT
fixed by bug 673958
Comment 7 Marco Zehe (:MarcoZ) 2011-09-29 07:58:47 PDT
Verified fixed in Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0a1) Gecko/20110929 Firefox/10.0a1

Note You need to log in before you can comment on or make changes to this bug.