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

ScrollBar doensn't receive onScroll event

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 8
    • Fix Version/s: 9
    • Component/s: javafx
    • Labels:
    • Environment:

      b116

      Description

      To reproduce place mouse over the scroll bar and turn the wheel. Expect receiving onScroll.

      import javafx.application.Application;
      import javafx.event.EventHandler;
      import javafx.scene.Scene;
      import javafx.scene.control.ComboBox;
      import javafx.scene.control.ScrollBar;
      import javafx.scene.input.ScrollEvent;
      import javafx.scene.layout.HBox;
      import javafx.stage.Stage;

      public class App extends Application {

          public static void main(String[] args) {
              launch(args);
          }
          
          @Override
          public void start(Stage stage) throws Exception {
              HBox root = new HBox(4);

              root.getChildren().add(new ComboBox());

              ScrollBar scrollBar = new ScrollBar();
              scrollBar.setOnScroll(new EventHandler<ScrollEvent>() {
                  @Override
                  public void handle(ScrollEvent scrollEvent) {
                      System.err.println("On Scroll");
                  }
              });

              root.getChildren().add(scrollBar);

              Scene scene = new Scene(root, 404, 300);
              stage.setScene(scene);
              stage.show();
          }

      }

        Attachments

          Activity

            People

            • Assignee:
              jgiles Jonathan Giles
              Reporter:
              dzinkevi Dmitry Zinkevich (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: