You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When embedding a JCEF web view in a Swing application, mouse events on JMenu or JMenuItem components publish duplicate MOUSE_PRESSED events. Due to this, the menu opens and closes immediately, making it difficult to interact with the menu items.
To Reproduce
Steps to reproduce the behavior:
Create a JFrame with a JMenuBar and embed a JCEF web view component.
Add a MouseListener to the JMenu to log mouse events.
Click on the menu item (e.g., "File") in the JMenuBar.
Observe duplicate MOUSE_PRESSED events being published in the console.
Expected behavior
Only a single MOUSE_PRESSED event should be published when interacting with the JMenu. The menu should open and remain open until a selection is made or it is closed by user interaction.
Screenshots
Example of duplicate MOUSE_PRESSED events being logged:
Mouse pressed: java.awt.event.MouseEvent[MOUSE_PRESSED,(23,12),absolute(23,64),button=1,modifiers=Button1,extModifiers=Button1,clickCount=1] on javax.swing.JMenu[,0,0,42x21,alignmentX=0.0,alignmentY=0.0,border=com.apple.laf.AquaMenuBorder@55612535,flags=392,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=0,left=0,bottom=0,right=0],paintBorder=false,paintFocus=false,pressedIcon=,rolloverEnabled=false,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=File]
Mouse pressed: java.awt.event.MouseEvent[MOUSE_PRESSED,(23,12),absolute(23,64),button=1,modifiers=Button1,extModifiers=Button1,clickCount=1] on javax.swing.JMenu[,0,0,42x21,alignmentX=0.0,alignmentY=0.0,border=com.apple.laf.AquaMenuBorder@55612535,flags=392,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,disabledSelectedIcon=,margin=javax.swing.plaf.InsetsUIResource[top=0,left=0,bottom=0,right=0],paintBorder=false,paintFocus=false,pressedIcon=,rolloverEnabled=false,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=File]
Versions (please complete the following information):
OS: Apple M1 Max, 14.5
Java Version: OpenJDK 21.0.1
JCEF Version: jcefmaven: 127.3.1
CEF Version: 127.0.6533.100
Additional context
The issue is reproducible only when the JCEF web view is embedded in the Swing application. Without the JCEF component, only a single MOUSE_PRESSED event is published.
The application was run from IntelliJ IDEA using the following command:
Describe the bug
When embedding a JCEF web view in a Swing application, mouse events on JMenu or JMenuItem components publish duplicate MOUSE_PRESSED events. Due to this, the menu opens and closes immediately, making it difficult to interact with the menu items.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Only a single MOUSE_PRESSED event should be published when interacting with the JMenu. The menu should open and remain open until a selection is made or it is closed by user interaction.
Screenshots
Example of duplicate MOUSE_PRESSED events being logged:
Versions (please complete the following information):
Additional context
windowless_rendering_enabled
set to both true and false.The text was updated successfully, but these errors were encountered: