mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-14 12:22:19 +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);
|
this.processExternalProvider(config);
|
||||||
const originalLoginAction = this.submitAction;
|
const originalLoginAction = this.submitAction;
|
||||||
this.submitAction = (_) => {
|
this.submitAction = (_) => {
|
||||||
|
if (globalScene.tweens.getTweensOf(this.modalContainer).length === 0) {
|
||||||
// Prevent overlapping overrides on action modification
|
// Prevent overlapping overrides on action modification
|
||||||
this.submitAction = originalLoginAction;
|
this.submitAction = originalLoginAction;
|
||||||
this.sanitizeInputs();
|
this.sanitizeInputs();
|
||||||
@ -163,6 +164,7 @@ export default class LoginFormUiHandler extends FormModalUiHandler {
|
|||||||
onFail(error);
|
onFail(error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -91,6 +91,7 @@ export default class RegistrationFormUiHandler extends FormModalUiHandler {
|
|||||||
|
|
||||||
const originalRegistrationAction = this.submitAction;
|
const originalRegistrationAction = this.submitAction;
|
||||||
this.submitAction = (_) => {
|
this.submitAction = (_) => {
|
||||||
|
if (globalScene.tweens.getTweensOf(this.modalContainer).length === 0) {
|
||||||
// Prevent overlapping overrides on action modification
|
// Prevent overlapping overrides on action modification
|
||||||
this.submitAction = originalRegistrationAction;
|
this.submitAction = originalRegistrationAction;
|
||||||
this.sanitizeInputs();
|
this.sanitizeInputs();
|
||||||
@ -128,6 +129,7 @@ export default class RegistrationFormUiHandler extends FormModalUiHandler {
|
|||||||
onFail(registerError);
|
onFail(registerError);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user