JDK-8087863 : Mac: "Select All" within ListView/TreeView is handled differently depending on the useSystemMenuBar value
  • Type: Bug
  • Component: javafx
  • Sub-Component: window-toolkit
  • Affected Version: 7u6
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2012-07-05
  • Updated: 2024-10-14
  • Resolved: 2024-10-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
jfx24 b13Fixed
Related Reports
Blocks :  
Relates :  
Relates :  
Description
Lets define a "Select All" menu item with CTL + A / CMD + A accelerators.
When calling "Select All" while a ListView or a TreeView is focused, we get different behavior depending on the useSystemMenuBar value :
- if we do use the system menu bar (Mac OS), the menu item onAction method is invoked
- if we do not use the system menu bar (windows), the menu item onAction method is not invoked

The behavior should be the same.

Simple test case to reproduce.
Comments
Changeset: ec60af47 Branch: master Author: Martin Fox <mfox@openjdk.org> Date: 2024-10-09 19:44:24 +0000 URL: https://git.openjdk.org/jfx/commit/ec60af479b824da521b14522c07d814e08dea3e5
09-10-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jfx/pull/1528 Date: 2024-08-02 19:07:35 +0000
02-08-2024

The native mac menubar registers accelerators with callbacks when it creates menu items. Callback is called when the accelerator is invoked and it processes the action, without considering the fact that the keyevent was already consumed by the FX UI control. There needs to be a mechanism to check if the key event is already consumed, and if so the callback should not be invoked. This IMHO has to be done in the glass / native layer.
24-01-2013

Seems like the control ( list view) should get the key event first. And only if it is not consumed - should the menu short cut be applied. Morris I think this is in the glass layer.
18-07-2012

This seems more of a controls issue than a graphics issue.
10-07-2012

Paru - could you dig into this?
10-07-2012

I think that this is a problem with the Mac system menu bar. ListView uses Ctrl-A to select-all, and it should get first refusal on the key event, the the mnemonic action shouldn't get called. Re-assigning for further evaluation.
10-07-2012

Assigning to Mick for comment.
09-07-2012