mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-23 15:00:30 +01:00
Workaround for weird JFXComboBox bug
The currency list would show up the list overlay. That gets triggered by unclear reasons. The bindings on the action and cancel buttons are causing that behaviour (maybe causes some render cycle which then causes the issue...). By requesting focus on our view directly after the onTakeOffer updates the bindable properties we can get rid of that UI glitch.
This commit is contained in:
parent
5eec562953
commit
884fe09b25
1 changed files with 10 additions and 0 deletions
|
@ -267,6 +267,9 @@ public class BsqSwapTakeOfferView extends BsqSwapOfferView<BsqSwapTakeOfferViewM
|
||||||
log.error(errorMessage);
|
log.error(errorMessage);
|
||||||
new Popup().warning(errorMessage).show();
|
new Popup().warning(errorMessage).show();
|
||||||
});
|
});
|
||||||
|
// JFXComboBox causes a bug with requesting focus. Not clear why that happens but requesting a focus
|
||||||
|
// on our view here avoids that the currency List overlay gets displayed.
|
||||||
|
requestFocus();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -287,11 +290,18 @@ public class BsqSwapTakeOfferView extends BsqSwapOfferView<BsqSwapTakeOfferViewM
|
||||||
log.error(errorMessage);
|
log.error(errorMessage);
|
||||||
new Popup().warning(errorMessage).show();
|
new Popup().warning(errorMessage).show();
|
||||||
});
|
});
|
||||||
|
requestFocus();
|
||||||
}).show(model.offer, model.dataModel.getBtcAmount().get(), model.dataModel.getPrice().get());
|
}).show(model.offer, model.dataModel.getBtcAmount().get(), model.dataModel.getPrice().get());
|
||||||
|
|
||||||
offerDetailsWindowDisplayed = true;
|
offerDetailsWindowDisplayed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void requestFocus() {
|
||||||
|
// JFXComboBox causes a bug with requesting focus. Not clear why that happens but requesting a focus
|
||||||
|
// on our view here avoids that the currency List overlay gets displayed.
|
||||||
|
root.requestFocus();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCancel2() {
|
protected void onCancel2() {
|
||||||
close();
|
close();
|
||||||
|
|
Loading…
Add table
Reference in a new issue