mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-21 21:33:25 +08:00
fix: sign up captcha challenge appearing under the modal, making it impossible to sign up
This commit is contained in:
parent
c3671fbc75
commit
3a012bd3b9
2 changed files with 7 additions and 1 deletions
|
@ -9,6 +9,7 @@ export let promise = new Promise<string | undefined>((resolve) => {
|
|||
|
||||
export function show(): void {
|
||||
void modal.show({
|
||||
mode: "dialog",
|
||||
beforeAnimation: async (modal) => {
|
||||
promise = new Promise((resolve) => {
|
||||
resolvePromise = resolve;
|
||||
|
|
|
@ -27,6 +27,7 @@ type ShowHideOptions = {
|
|||
};
|
||||
|
||||
export type ShowOptions = ShowHideOptions & {
|
||||
mode?: "modal" | "dialog";
|
||||
focusFirstInput?: true | "focusAndSelect";
|
||||
modalChain?: AnimatedModal;
|
||||
};
|
||||
|
@ -199,7 +200,11 @@ export default class AnimatedModal {
|
|||
}
|
||||
|
||||
this.open = true;
|
||||
this.wrapperEl.showModal();
|
||||
if (options?.mode === "dialog") {
|
||||
this.wrapperEl.show();
|
||||
} else if (options?.mode === "modal" || options?.mode === undefined) {
|
||||
this.wrapperEl.showModal();
|
||||
}
|
||||
|
||||
//wait until the next event loop to allow the dialog to start animating
|
||||
setTimeout(async () => {
|
||||
|
|
Loading…
Reference in a new issue