-
Type:
Bug
-
Resolution: Cannot Reproduce
-
Priority:
P4
-
Affects Version/s: 8u66
-
Component/s: javafx
-
x86
-
other
FULL PRODUCT VERSION :
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Mac OS X 10.11.2
A DESCRIPTION OF THE PROBLEM :
The MouseReleased event is not triggered if the mouse button is released while
1) moving the mouse pointer AND 2) the mouse pointer is outside of the control's bounds.
It works fine if the mouse button is released when the mouse is stopped. This works fine in Windows, but fails in Mac OS X.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1) Run the executable test case.
2) Click on the black rectangle and hold. You will see "Pressed" in the console.
3) Move the mouse outside of the rectangle and release the button while the mouse is still moving. You will NOT see "Released" in the console.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.layout.Pane;
import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;
public class TestMouseRelease extends Application {
@Override
public void start(Stage stage) {
Rectangle rectangle = new Rectangle(50, 50);
rectangle.setOnMousePressed(event -> System.out.println("Pressed"));
rectangle.setOnMouseReleased(event -> System.out.println("Released"));
Pane pane = new Pane();
pane.setPrefSize(200, 200);
pane.getChildren().add(rectangle);
Scene scene = new Scene(new Group());
scene.setRoot(pane);
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
---------- END SOURCE ----------
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Mac OS X 10.11.2
A DESCRIPTION OF THE PROBLEM :
The MouseReleased event is not triggered if the mouse button is released while
1) moving the mouse pointer AND 2) the mouse pointer is outside of the control's bounds.
It works fine if the mouse button is released when the mouse is stopped. This works fine in Windows, but fails in Mac OS X.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1) Run the executable test case.
2) Click on the black rectangle and hold. You will see "Pressed" in the console.
3) Move the mouse outside of the rectangle and release the button while the mouse is still moving. You will NOT see "Released" in the console.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.layout.Pane;
import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;
public class TestMouseRelease extends Application {
@Override
public void start(Stage stage) {
Rectangle rectangle = new Rectangle(50, 50);
rectangle.setOnMousePressed(event -> System.out.println("Pressed"));
rectangle.setOnMouseReleased(event -> System.out.println("Released"));
Pane pane = new Pane();
pane.setPrefSize(200, 200);
pane.getChildren().add(rectangle);
Scene scene = new Scene(new Group());
scene.setRoot(pane);
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
---------- END SOURCE ----------