mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-01 11:16:11 -04:00
Fix bug with closing wallet password popup when pressing enter or escape
This commit is contained in:
parent
da91a15431
commit
3561640870
1 changed files with 8 additions and 6 deletions
|
@ -380,12 +380,14 @@ public abstract class Overlay<T extends Overlay> {
|
||||||
scene.getStylesheets().setAll(rootScene.getStylesheets());
|
scene.getStylesheets().setAll(rootScene.getStylesheets());
|
||||||
scene.setFill(Color.TRANSPARENT);
|
scene.setFill(Color.TRANSPARENT);
|
||||||
|
|
||||||
|
if (!hideCloseButton) {
|
||||||
scene.setOnKeyPressed(e -> {
|
scene.setOnKeyPressed(e -> {
|
||||||
if (e.getCode() == KeyCode.ESCAPE || e.getCode() == KeyCode.ENTER) {
|
if (e.getCode() == KeyCode.ESCAPE || e.getCode() == KeyCode.ENTER) {
|
||||||
e.consume();
|
e.consume();
|
||||||
doClose();
|
doClose();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
stage = new Stage();
|
stage = new Stage();
|
||||||
stage.setScene(scene);
|
stage.setScene(scene);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue