mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-15 12:52:20 +02:00
fix holding enter spam
This commit is contained in:
parent
14614eb60a
commit
f52e69bf2e
@ -142,6 +142,7 @@ export default class LoginFormUiHandler extends FormModalUiHandler {
|
||||
this.processExternalProvider(config);
|
||||
const originalLoginAction = this.submitAction;
|
||||
this.submitAction = (_) => {
|
||||
if (globalScene.tweens.getTweensOf(this.modalContainer).length === 0) {
|
||||
// Prevent overlapping overrides on action modification
|
||||
this.submitAction = originalLoginAction;
|
||||
this.sanitizeInputs();
|
||||
@ -163,6 +164,7 @@ export default class LoginFormUiHandler extends FormModalUiHandler {
|
||||
onFail(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
return true;
|
||||
|
@ -91,6 +91,7 @@ export default class RegistrationFormUiHandler extends FormModalUiHandler {
|
||||
|
||||
const originalRegistrationAction = this.submitAction;
|
||||
this.submitAction = (_) => {
|
||||
if (globalScene.tweens.getTweensOf(this.modalContainer).length === 0) {
|
||||
// Prevent overlapping overrides on action modification
|
||||
this.submitAction = originalRegistrationAction;
|
||||
this.sanitizeInputs();
|
||||
@ -128,6 +129,7 @@ export default class RegistrationFormUiHandler extends FormModalUiHandler {
|
||||
onFail(registerError);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user