Bug 508055 - MenuStrip: menu item gets "focused" state from selectChild when menu is collapsed
Summary: MenuStrip: menu item gets "focused" state from selectChild when menu is colla...
Status: NEW
Alias: None
Product: UI Automation
Classification: Mono
Component: Winforms - General (show other bugs)
Version: Release 1.0
Hardware: x86 openSUSE 11.1
: P3 - Medium : Normal
Target Milestone: ---
Assignee: E-mail List
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-29 04:43 UTC by Brian Merrell
Modified: 2009-07-02 03:21 UTC (History)
1 user (show)

See Also:
Found By: Integration Test
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
pyatspi script referenced in REPRO steps (1.62 KB, text/plain)
2009-05-29 04:44 UTC, Brian Merrell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Merrell 2009-05-29 04:43:13 UTC
PROBLEM STATEMENT

Calling pyatspi's selectChild method on a menu item of a menu on a menu bar results in the menu item accessible receiving the "focused".  The problem is that this occurs not only when the menu item's menu is drop-down--which is expected--but it also occurs when the menu item's menu is collapsed (i.e., when the menu item isn't showing).

REPRO

1.  Run uia2atk/test/samples/menustrip.py
2.  Run the attached pyatspi script, which does the following:
    1.  Prints the states of the "Paste" menu item 
    2.  calls selectChild(1) on the "Edit" menu, which selects the "Paste" menu 
        item of the "Edit" menu
    3.  Prints the states of the "Paste" menu item (and the "Copy" menu item for
        comparison.

RESULTS

The "Paste" menu item has gained the "selected" state--which is expected--but it also gains the "focused" state, even though the "Edit" menu is collapsed and the "Paste" menu item isn't showing.

EXPECTED RESULTS

The "Paste" menu item should only receive the "selected" state.  I have verified the expected behavior in Gtk (with the gtkmenubar.py sample).

COMMENTS

There are some commented out lines in the script that you can uncomment that clicks on the "Edit" menu first before calling the selectChild method.  Doing this results in the expected behavior of both the "focused" and "selected" methods being added to the "Paste" menu item.
Comment 1 Brian Merrell 2009-05-29 04:44:20 UTC
Created attachment 295099 [details]
pyatspi script referenced in REPRO steps