UNPKG

forms-reactive

Version:

Reactive Form Web Component

45 lines (41 loc) 1.65 kB
'use strict'; const index = require('./index-6e930523.js'); const index$1 = require('./index-1d5e0fbd.js'); const helpers = require('./helpers-4dca71bf.js'); require('./index-08ee9991.js'); require('./ionic-global-59ee60c1.js'); /*! * (C) Ionic http://ionicframework.com - MIT License */ const startStatusTap = () => { const win = window; win.addEventListener('statusTap', () => { index.readTask(() => { const width = win.innerWidth; const height = win.innerHeight; const el = document.elementFromPoint(width / 2, height / 2); if (!el) { return; } const contentEl = index$1.findClosestIonContent(el); if (contentEl) { new Promise((resolve) => helpers.componentOnReady(contentEl, resolve)).then(() => { index.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 index$1.scrollToTop(contentEl, 300); contentEl.style.removeProperty('--overflow'); }); }); } }); }); }; exports.startStatusTap = startStatusTap; //# sourceMappingURL=status-tap-b260b8e9.js.map