Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8280057

[macOS] Paste event triggered twice from accelerator in system menubar and text input control

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • None
    • javafx
    • None

      If a MenuBar set as systemMenuBar has a menuItem with an accelerator that uses as key combination Cmd+V, and the scene has a focused text input control, pressing Cmd+V pastes twice the content of the clipboard.

      Originally posted at: https://github.com/javafxports/openjdk-jfx/issues/370, and added as a comment to JDK-8205915.

      However, the current PR for JDK-8205915, https://github.com/openjdk/jfx/pull/715, doesn't fix it.

      The issue has also been discussed in JDK-8242544. In fact, there was a closed PR https://github.com/openjdk/jfx/pull/704 that fixed it, by removing a duplicate call in performKeyEquivalent. However, the accepted fix https://git.openjdk.java.net/jfx/pull/714 does not fix it.

      A proper fix should take into consideration that Cmd+V should be handled by the textField directly and the MenuItem should not fire at all.

            Unassigned Unassigned
            jpereda Jose Pereda
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: