UNPKG

forms-reactive

Version:

Reactive Form Web Component

43 lines (40 loc) 1.66 kB
import { d as readTask, w as writeTask } from './index-c364827c.js'; import { a as findClosestIonContent, s as scrollToTop } from './index-ab10c92a.js'; import { d as componentOnReady } from './helpers-609e93da.js'; import './index-ad7a76eb.js'; import './ionic-global-9c20d605.js'; /*! * (C) Ionic http://ionicframework.com - MIT License */ const startStatusTap = () => { const win = window; win.addEventListener('statusTap', () => { readTask(() => { const width = win.innerWidth; const height = win.innerHeight; const el = document.elementFromPoint(width / 2, height / 2); if (!el) { return; } const contentEl = findClosestIonContent(el); if (contentEl) { new Promise((resolve) => componentOnReady(contentEl, resolve)).then(() => { writeTask(async () => { /** * If scrolling and user taps status bar, * only calling scrollToTop is not enough * as engines like WebKit will jump the * scroll position back down and complete * any in-progress momentum scrolling. */ contentEl.style.setProperty('--overflow', 'hidden'); await scrollToTop(contentEl, 300); contentEl.style.removeProperty('--overflow'); }); }); } }); }); }; export { startStatusTap }; //# sourceMappingURL=status-tap-b13263f8.js.map