Details
Description
Unfocusable ListView can get focused by clicking on its scroll bar.
Code to reproduce the issue:
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.ListView;
import javafx.stage.Stage;
public class ListViewFocus extends Application
{
@Override
public void start(final Stage stage) throws Exception
{
final ListView<String> listView = new ListView<>();
listView.setPrefHeight(150.0);
listView.getItems().addAll("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o");
listView.setFocusTraversable(false);
stage.setScene(new Scene(listView));
stage.show();
}
public static void main(final String[] args)
{
Application.launch(args);
}
}
To see the problem, click on the ListView vertical scroll bar.
Code to reproduce the issue:
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.ListView;
import javafx.stage.Stage;
public class ListViewFocus extends Application
{
@Override
public void start(final Stage stage) throws Exception
{
final ListView<String> listView = new ListView<>();
listView.setPrefHeight(150.0);
listView.getItems().addAll("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o");
listView.setFocusTraversable(false);
stage.setScene(new Scene(listView));
stage.show();
}
public static void main(final String[] args)
{
Application.launch(args);
}
}
To see the problem, click on the ListView vertical scroll bar.