Pressing escape to close menu doesn't return focus properly

RESOLVED WORKSFORME

Status

()

RESOLVED WORKSFORME
13 years ago
12 years ago

People

(Reporter: wwalker, Assigned: nian.liu)

Tracking

({access})

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20051214 Firefox/1.6a1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20051214 Firefox/1.6a1

When you use keyboard traversal to open a menu (e.g., the File menu) and you then press escape to close the menu, the accessible focus doesn't return to the object that had focus.  Instead, the AT-SPI implementation emits an event saying the frame has focus.


Reproducible: Always

Steps to Reproduce:
1) Run the attached test case in an xterm
2) Run Firefox
3) Press Tab to give something focus
4) Press Alt+F to bring up the file menu
5) Press Esc to dismiss the file menu
6) Observe the output in the xterm
Actual Results:  
You will see the following output:

focus: 0 0 <CORBA.any of type 'IDL:omg.org/CORBA/Null:1.0'>
  name=None role='panel' state='ENABLED FOCUSABLE FOCUSED SENSITIVE SHOWING VISIBLE'
keystroke type=%d hw_code=%d modifiers=%d event_string=(%s) is_text=%s
keystroke type=%d hw_code=%d modifiers=%d event_string=(%s) is_text=%s
focus: 0 0 <CORBA.any of type 'IDL:omg.org/CORBA/Null:1.0'>
  name='File' role='menu' state='ENABLED FOCUSABLE FOCUSED SENSITIVE SHOWING VISIBLE'
focus: 0 0 <CORBA.any of type 'IDL:omg.org/CORBA/Null:1.0'>
  name='New Window' role='menu item' state='ENABLED FOCUSABLE FOCUSED SENSITIVE
SHOWING VISIBLE'
keystroke type=%d hw_code=%d modifiers=%d event_string=(%s) is_text=%s
keystroke type=%d hw_code=%d modifiers=%d event_string=(%s) is_text=%s
keystroke type=%d hw_code=%d modifiers=%d event_string=(%s) is_text=%s
focus: 0 0 <CORBA.any of type 'IDL:omg.org/CORBA/Null:1.0'>
  name='Google - Deer Park Alpha 2' role='frame' state='ACTIVE ENABLED FOCUSABLE FOCUSED SENSITIVE SHOWING VISIBLE'
keystroke type=%d hw_code=%d modifiers=%d event_string=(%s) is_text=%s

You'll see that the focus has ended up on the top level frame
and not where it started prior to the Alt+F.  Actually, the "real" focus does end up at the right spot (I think), but the AT-SPI event doesn't tell us this - it gives it to the frame.



Expected Results:  
An AT-SPI event should be issued to say which component really has focus when the menu goes away.
(Reporter)

Comment 1

13 years ago
Created attachment 205962 [details]
Standalone test case

Comment 2

13 years ago
same problem on Windows
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 3

13 years ago
Hmm, this used to work on Windows, I believe it's probably a regression.

Most likely something in nsRootAccessible::HandleEvent()

Updated

12 years ago
Blocks: 342901
Keywords: access
(Assignee)

Comment 4

12 years ago
similar with popup menu close focus setting
Assignee: nobody → nian.liu
(Assignee)

Comment 5

12 years ago
wfm on trunk now
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.