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

MenuItem's accelerator gets fired even when ContextMenu is set to null

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: openjfx16
    • Fix Version/s: openjfx18
    • Component/s: javafx
    • Labels:

      Description

      This scenario was identified while fixing JDK-8244075.
      An accelerator of MenuItem should get removed when a Control is removed from Scene and it's ContextMenu is set to null.
      Currently the accelerator is not removed and it gets fired if that Control is added back to Scene.
      This issue is fixed for Button, but occurs for other Controls.
      A test is already included in AcceleratorParameterizedTest
      Test name: testAcceleratorShouldNotGetFiredWhenControlsIsRemovedFromSceneThenContextMenuIsSetToNullAndControlIsAddedBackToScene().

      The test passes for Button but fails for other controls (Tab, TableColumn, TreeTableColumn).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              arapte Ambarish Rapte
              Reporter:
              arapte Ambarish Rapte
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: