Skip to content

Commit 5d249c4

Browse files
author
Alexander Zuev
committedNov 18, 2021
8275071: [macos] A11y cursor gets stuck when combobox is closed
Reviewed-by: serb, pbansal
1 parent 354a34e commit 5d249c4

File tree

1 file changed

+12
-18
lines changed

1 file changed

+12
-18
lines changed
 

‎src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessible.java

+12-18
Original file line numberDiff line numberDiff line change
@@ -164,24 +164,18 @@ public void propertyChange(PropertyChangeEvent e) {
164164
treeNodeCollapsed(ptr);
165165
}
166166

167-
// At least for now don't handle combo box menu state changes.
168-
// This may change when later fixing issues which currently
169-
// exist for combo boxes, but for now the following is only
170-
// for JPopupMenus, not for combobox menus.
171-
if (parentRole != AccessibleRole.COMBO_BOX) {
172-
if (thisRole == AccessibleRole.POPUP_MENU) {
173-
if ( newValue != null &&
174-
((AccessibleState)newValue) == AccessibleState.VISIBLE ) {
175-
menuOpened(ptr);
176-
} else if ( oldValue != null &&
177-
((AccessibleState)oldValue) == AccessibleState.VISIBLE ) {
178-
menuClosed(ptr);
179-
}
180-
} else if (thisRole == AccessibleRole.MENU_ITEM) {
181-
if ( newValue != null &&
182-
((AccessibleState)newValue) == AccessibleState.FOCUSED ) {
183-
menuItemSelected(ptr);
184-
}
167+
if (thisRole == AccessibleRole.POPUP_MENU) {
168+
if ( newValue != null &&
169+
((AccessibleState)newValue) == AccessibleState.VISIBLE ) {
170+
menuOpened(ptr);
171+
} else if ( oldValue != null &&
172+
((AccessibleState)oldValue) == AccessibleState.VISIBLE ) {
173+
menuClosed(ptr);
174+
}
175+
} else if (thisRole == AccessibleRole.MENU_ITEM) {
176+
if ( newValue != null &&
177+
((AccessibleState)newValue) == AccessibleState.FOCUSED ) {
178+
menuItemSelected(ptr);
185179
}
186180
}
187181

0 commit comments

Comments
 (0)