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

Once accessed by mnemonic shortcut, menus remain highlighted permanently

    Details

    • Type: Bug
    • Status: Open
    • Priority: P3
    • Resolution: Unresolved
    • Affects Version/s: 8u251, 9, openjfx11, openjfx14
    • Fix Version/s: tbd
    • Component/s: javafx
    • Subcomponent:
    • CPU:
      x86_64
    • OS:
      windows_10

      Description

      ADDITIONAL SYSTEM INFORMATION :
      C:\Users\hwaite>ver

      Microsoft Windows [Version 10.0.17763.1098]

      A DESCRIPTION OF THE PROBLEM :
      Pressing Alt-<key> to access menu imposes highlight that won't go away.

      REGRESSION : Last worked in version 14

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Launch included application with VM params "-p <JavaFX home>\lib --add-modules javafx.controls"
      2. Press Alt-A
      3. Press Right-Arrow key

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Pressing Alt-A will highlight "Alpha" menu. Pressing Right-Arrow should unhighlight "Alpha" and highlight "Bravo".
      ACTUAL -
      After pressing Right-Arrow key, both "Alpha" and "Bravo" menus are highlighted.

      ---------- BEGIN SOURCE ----------
      import java.util.stream.Collectors;
      import java.util.stream.Stream;

      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.Menu;
      import javafx.scene.control.MenuBar;
      import javafx.scene.control.TableView;
      import javafx.scene.layout.BorderPane;
      import javafx.stage.Stage;

      public class TestApp extends Application {
        public static void main(String[] pArgs) {launch(pArgs);}

        public void start(Stage pStage) {
          final BorderPane borderPane = new BorderPane();
          final MenuBar menuBar = new MenuBar();
          menuBar.getMenus().addAll(
            Stream.of("_Alpha", "_Bravo", "_Charlie", "").map(Menu::new).collect(
              Collectors.toList()
            )
          );
          borderPane.setTop(menuBar);
          borderPane.setCenter(new TableView<>());
          pStage.setScene(new Scene(borderPane));
          pStage.show();
        }
      }
      ---------- END SOURCE ----------

      FREQUENCY : always


        Attachments

          Activity

            People

            • Assignee:
              aghaisas Ajit Ghaisas
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: