summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-09-17 21:11:46 +0800
committerEltrac <hi@guhub.cn>2025-09-17 21:11:46 +0800
commit23ad3ed2d45ab5cdb4e320ab5c64b4f1a16ed3b1 (patch)
treea142c26f132f305f878469abfc7adbccc7e9639d
parent58ef00994cb1924cc4e89f11821fdba5a25e3c4c (diff)
fix: did not add 'open' class to open shadow
-rw-r--r--src/shadow.js2
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';