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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3
    • tbd
    • jfx16
    • javafx

    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

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

              Dates

                Created:
                Updated: