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

ListView is not refreshed when navigated through keyboard arrow keys with Narrator application

    XMLWordPrintable

Details

    • x86_64
    • windows_10

    Description

      ADDITIONAL SYSTEM INFORMATION :
      tested with Java 8u301, Java 17 - both with the bug described

      A DESCRIPTION OF THE PROBLEM :
      When you scroll with arrow down/up within a list and with voice output active (Narrator with scan modus inactive or JAWS) than you will see empty list entries that stay empty when you stop scrolling. Instead PageDown/PageUp work properly.

      btw: Activate Narrator with WIN+CTRL+ENTER, deactivate scan modus with CAPS LOCK + SPACE


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      import javafx.application.Application;
      import javafx.collections.FXCollections;
      import javafx.collections.ObservableList;
      import javafx.scene.Parent;
      import javafx.scene.Scene;
      import javafx.scene.control.Label;
      import javafx.scene.control.ListCell;
      import javafx.scene.control.ListView;
      import javafx.scene.layout.HBox;
      import javafx.scene.layout.VBox;
      import javafx.stage.Stage;

      public class MainListViewBug extends Application {

          @Override
          public void start(final Stage primaryStage) {

              ObservableList<Parent> testArrayList = FXCollections.observableArrayList();
              for (int i = 0; i < 300; i++) {

                  HBox h = new HBox();
                  Label l = new Label("Element " + i);
                  h.getChildren().setAll(l);
                  testArrayList.add(h);
              }
              ListView listView = new ListView(testArrayList);

              listView.setCellFactory(param -> new ListCell<HBox>() {
                  @Override
                  protected void updateItem(final HBox item, final boolean empty) {
                      super.updateItem(item, empty);
                      if (empty) {
                          setText(null);
                          setGraphic(null);
                      } else {
                          setGraphic(item);
                      }
                  }
              });

              VBox root = new VBox();
              root.getChildren().addAll(listView);


              Scene scene = new Scene(root, 450, 250);


              primaryStage.setTitle("Test");
              primaryStage.setScene(scene);
              primaryStage.show();
          }

          public static void main(String[] args) {
              launch(args);
          }

      }




      FREQUENCY : always


      Attachments

        Issue Links

          Activity

            People

              aghaisas Ajit Ghaisas
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: