mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
feat: hiding dialog using X button should remove class "overflow-hidden" (#1555)
Hiding dialogs result in the body to stay frozen due to mounting behaviour of the dialog, but using 'X' button hides the dialog and won't let user scroll any further. Removing overflow behaviour during hiding procedure will improve User Experience.
This commit is contained in:
@ -92,6 +92,7 @@ export function generateDialog<T extends DialogProps>(
|
|||||||
hide: () => {
|
hide: () => {
|
||||||
tempDiv.firstElementChild?.classList.remove("showup");
|
tempDiv.firstElementChild?.classList.remove("showup");
|
||||||
tempDiv.firstElementChild?.classList.add("showoff");
|
tempDiv.firstElementChild?.classList.add("showoff");
|
||||||
|
document.body.classList.remove("overflow-hidden");
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user