| JDK 8 | Other |
|---|---|
| 8u331Fixed | openjfx17Fixed |
|
Blocks :
|
|
|
Blocks :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
This was found while working on JDK-8175358 as a review comment in PR - https://github.com/openjdk/jfx/pull/199.
It can be easily reproduced by either modifying test JDK-8175358 in to use a ContextMenu or running following JunitTest (to be added in AcceleratorParameterizedTest.java)
@Test public void testAcceleratorIsNotFiredWhenMenuItemRemovedFromScene() {
KeyEventFirer kb = new KeyEventFirer(item1, scene);
kb.doKeyPress(KeyCode.DIGIT1, KeyModifier.ALT);
assertEquals(1, eventCounter);
// Remove all children from the scene
Group root = (Group)scene.getRoot();
root.getChildren().clear();
kb.doKeyPress(KeyCode.DIGIT1, KeyModifier.ALT);
assertEquals(1, eventCounter);
}
|