Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private async confirmDeleteElement($event: UIEvent) {
const popover: HTMLIonPopoverElement = await popoverController.create({
component: 'app-element-delete',
event: $event,
mode: isMobile() && !isIOS() ? 'md' : 'ios'
});
popover.onDidDismiss().then(async (detail: OverlayEventDetail) => {
if (detail && detail.data) {
await this.deleteElement();
}
});
await popover.present();
}
return new Promise((resolve) => {
if (!this.stickyMobile || !isIOS() || !window) {
resolve();
return;
}
if (this.iOSTimerScroll > 0) {
clearTimeout(this.iOSTimerScroll);
}
this.iOSTimerScroll = setTimeout(() => {
this.el.style.setProperty('--deckgo-inline-editor-sticky-scroll', `${window.scrollY}px`);
}, 50);
resolve();
});
}
private stickyToolbarActivated($event: CustomEvent) {
this.hideFooterActions = $event ? $event.detail : false;
this.hideNavigation = $event ? isIOS() && $event.detail : false;
}
hostData() {
return {
class: {
'deckgo-tools-ios': isIOS()
}
}
}
}