diff options
| author | Eltrac <hi@guhub.cn> | 2025-09-17 21:11:46 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-09-17 21:11:46 +0800 |
| commit | 23ad3ed2d45ab5cdb4e320ab5c64b4f1a16ed3b1 (patch) | |
| tree | a142c26f132f305f878469abfc7adbccc7e9639d | |
| parent | 58ef00994cb1924cc4e89f11821fdba5a25e3c4c (diff) | |
fix: did not add 'open' class to open shadow
| -rw-r--r-- | src/shadow.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/shadow.js b/src/shadow.js index 019cec5..8421fbe 100644 --- a/src/shadow.js +++ b/src/shadow.js @@ -52,6 +52,7 @@ export default class Shadow { open() { this.isOpen = true; + this.element.classList.add('open'); this.original.style.visibility = 'hidden'; if (!document.body.contains(this.element)) this.placeItself(); @@ -65,6 +66,7 @@ export default class Shadow { close() { this.isOpen = false; + this.element.classList.remove('open'); this.original.style.visibility = 'visible'; |
