Add requestFocus call to createOfferView as well

Move method to base class
This commit is contained in:
chimp1984 2021-11-03 12:34:49 +01:00
parent 9778950018
commit c1e470d6f7
No known key found for this signature in database
GPG Key ID: 9801B4EC591F90E3
3 changed files with 8 additions and 5 deletions

View File

@ -386,4 +386,10 @@ public abstract class BsqSwapOfferView<M extends BsqSwapOfferViewModel<?>> exten
}
protected abstract void checkForMissingFunds(Coin newValue);
protected 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();
}
}

View File

@ -233,10 +233,12 @@ public class BsqSwapCreateOfferView extends BsqSwapOfferView<BsqSwapCreateOfferV
if (DevEnv.isDevMode()) {
model.onPlaceOffer();
requestFocus();
return;
}
bsqSwapOfferDetailsWindow.onPlaceOffer(model::onPlaceOffer).show(model.dataModel.offer);
requestFocus();
}
@Override

View File

@ -296,11 +296,6 @@ public class BsqSwapTakeOfferView extends BsqSwapOfferView<BsqSwapTakeOfferViewM
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
protected void onCancel2() {