-
Bug
-
Resolution: Fixed
-
P3
-
8, 11, 17, 20, 21
-
b02
-
x86_64
-
os_x
ADDITIONAL SYSTEM INFORMATION :
Identification: JOSM/1.5 (18820 SVN en) Mac OS X 13.5
OS Build number: macOS 13.5 (22G74)
Memory Usage: 208 MB / 2048 MB (57 MB allocated, but free)
Java version: 20.0.2+9, Eclipse Adoptium, OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Screen: Display 188945233 1920×1080 (scaling 1.00×1.00) Display 188945231 1920×1080 (scaling 1.00×1.00) Display 69733382 1680×1050 (scaling 2.00×2.00)
Maximum Screen Size: 1920×1080
Best cursor sizes: 16×16→16×16, 32×32→32×32
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: en_US
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-agentlib:jdwp=transport=dt_socket,address=127.0.0.1:52105,suspend=y,server=n, -javaagent:${HOME}/Library/Caches/JetBrains/IntelliJIdea2023.2/captureAgent/debugger-agent.jar, -Dfile.encoding=UTF-8, -Dsun.stdout.encoding=UTF-8, -Dsun.stderr.encoding=UTF-8]
Program arguments: [--debug]
A DESCRIPTION OF THE PROBLEM :
There is a difference in behavior for macOS, Windows, and Linux.
Windows and Linux do not trigger the popup menu when the right mouse button is pressed and dragged from a component without a popup menu to/over/through a component with a popup menu. macOS does create a popup menu.
Please add josm-found as a label.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1) Run the attached test case
2) Press and hold the right mouse button down on the JLabel with the text "Right click and drag from here"
3) Move the mouse to the JLabel with the text "to here"
4) Observe that the popup menu assigned to the inner JPanel appears (macOS) or does not appear (Windows, Linux)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Consistent behavior between macOS, Windows, and Linux
ACTUAL -
macOS has different behavior from Windows and Linux
---------- BEGIN SOURCE ----------
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
class MouseDragPopup {
public static void main(String[] args) {
final JFrame frame = new JFrame("Mouse Drag Popup");
final JPanel panel = new JPanel();
final JPanel innerPanel = new JPanel();
final JPopupMenu menu = new JPopupMenu();
menu.add("This should not appear (and does not under Linux/Windows)");
innerPanel.setComponentPopupMenu(menu);
panel.add(new JLabel("Right click and drag from here"));
panel.add(innerPanel);
panel.add(new JLabel("to here"));
frame.add(panel);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
}
}
---------- END SOURCE ----------
FREQUENCY : always
Identification: JOSM/1.5 (18820 SVN en) Mac OS X 13.5
OS Build number: macOS 13.5 (22G74)
Memory Usage: 208 MB / 2048 MB (57 MB allocated, but free)
Java version: 20.0.2+9, Eclipse Adoptium, OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Screen: Display 188945233 1920×1080 (scaling 1.00×1.00) Display 188945231 1920×1080 (scaling 1.00×1.00) Display 69733382 1680×1050 (scaling 2.00×2.00)
Maximum Screen Size: 1920×1080
Best cursor sizes: 16×16→16×16, 32×32→32×32
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Locale info: en_US
Numbers with default locale: 1234567890 -> 1234567890
VM arguments: [-agentlib:jdwp=transport=dt_socket,address=127.0.0.1:52105,suspend=y,server=n, -javaagent:${HOME}/Library/Caches/JetBrains/IntelliJIdea2023.2/captureAgent/debugger-agent.jar, -Dfile.encoding=UTF-8, -Dsun.stdout.encoding=UTF-8, -Dsun.stderr.encoding=UTF-8]
Program arguments: [--debug]
A DESCRIPTION OF THE PROBLEM :
There is a difference in behavior for macOS, Windows, and Linux.
Windows and Linux do not trigger the popup menu when the right mouse button is pressed and dragged from a component without a popup menu to/over/through a component with a popup menu. macOS does create a popup menu.
Please add josm-found as a label.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1) Run the attached test case
2) Press and hold the right mouse button down on the JLabel with the text "Right click and drag from here"
3) Move the mouse to the JLabel with the text "to here"
4) Observe that the popup menu assigned to the inner JPanel appears (macOS) or does not appear (Windows, Linux)
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Consistent behavior between macOS, Windows, and Linux
ACTUAL -
macOS has different behavior from Windows and Linux
---------- BEGIN SOURCE ----------
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
class MouseDragPopup {
public static void main(String[] args) {
final JFrame frame = new JFrame("Mouse Drag Popup");
final JPanel panel = new JPanel();
final JPanel innerPanel = new JPanel();
final JPopupMenu menu = new JPopupMenu();
menu.add("This should not appear (and does not under Linux/Windows)");
innerPanel.setComponentPopupMenu(menu);
panel.add(new JLabel("Right click and drag from here"));
panel.add(innerPanel);
panel.add(new JLabel("to here"));
frame.add(panel);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
}
}
---------- END SOURCE ----------
FREQUENCY : always