fix(modal, popover): quickly opening modal/popover no longer presents duplicates (#24697)

This commit is contained in:
Liam DeBeasi
2022-02-02 13:38:17 -05:00
committed by GitHub
parent 0b18260da6
commit 928c5fbfcb
5 changed files with 8 additions and 19 deletions

View File

@ -502,8 +502,13 @@ export const dismiss = async (
activeAnimations.delete(overlay);
// Make overlay hidden again in case it is being reused
/**
* Make overlay hidden again in case it is being reused.
* We can safely remove pointer-events: none as
* overlay-hidden will set display: none.
*/
overlay.el.classList.add('overlay-hidden');
overlay.el.style.removeProperty('pointer-events');
} catch (err) {
console.error(err);