This commit is contained in:
sairaj mote 2020-09-14 18:51:15 +05:30
parent 092cd14aaa
commit 267372cff1
2 changed files with 10 additions and 1 deletions

View File

@ -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%)';

View File

@ -74,7 +74,7 @@
*Requires Rupee to be deposited first.
</p>
<sm-input floId id="token_receiver" placeholder="Reciever's FLO ID" required animate></sm-input>
<sm-input id="token_amount" placeholder="amount" type="number" min="1" required animate></sm-input>
<sm-input id="token_amount" placeholder="mount" type="number" min="1" required animate></sm-input>
</sm-popup>
<sm-popup id="deposit_rupee">
<header class="popup-header" slot="header">