From 267372cff19fb18924297b73189ffea1c8af4aaf Mon Sep 17 00:00:00 2001
From: sairaj mote
Date: Mon, 14 Sep 2020 18:51:15 +0530
Subject: [PATCH] 0.0.29
---
components.js | 9 +++++++++
index.html | 2 +-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/components.js b/components.js
index aded3a7..c52ae45 100644
--- a/components.js
+++ b/components.js
@@ -1772,6 +1772,8 @@ customElements.define('sm-popup', class extends HTMLElement {
constructor() {
super()
this.attachShadow({ mode: 'open' }).append(smPopup.content.cloneNode(true))
+
+ this.allowClosing = false
}
resumeScrolling() {
@@ -1783,6 +1785,9 @@ customElements.define('sm-popup', class extends HTMLElement {
}
show(pinned, popupStack) {
+ setTimeout(() => {
+ this.allowClosing = true
+ }, 300);
this.setAttribute('open', '')
this.pinned = pinned
this.popupStack = popupStack
@@ -1791,6 +1796,10 @@ customElements.define('sm-popup', class extends HTMLElement {
document.body.setAttribute('style', `overflow: hidden; top: -${window.scrollY}px`)
}
hide() {
+ if (!this.allowClosing) return
+ setTimeout(() => {
+ this.allowClosing = false
+ }, 300);
this.removeAttribute('open')
if (window.innerWidth < 648) {
this.popup.style.transform = 'translateY(100%)';
diff --git a/index.html b/index.html
index 2a85028..0a47e5c 100644
--- a/index.html
+++ b/index.html
@@ -74,7 +74,7 @@
*Requires Rupee to be deposited first.
-
+