1 | import { readTask, writeTask } from '@stencil/core/internal/client';
|
2 | import { c as componentOnReady } from './helpers.js';
|
3 |
|
4 | const startStatusTap = () => {
|
5 | const win = window;
|
6 | win.addEventListener('statusTap', () => {
|
7 | readTask(() => {
|
8 | const width = win.innerWidth;
|
9 | const height = win.innerHeight;
|
10 | const el = document.elementFromPoint(width / 2, height / 2);
|
11 | if (!el) {
|
12 | return;
|
13 | }
|
14 | const contentEl = el.closest('ion-content');
|
15 | if (contentEl) {
|
16 | new Promise(resolve => componentOnReady(contentEl, resolve)).then(() => {
|
17 | writeTask(async () => {
|
18 | |
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 | contentEl.style.setProperty('--overflow', 'hidden');
|
26 | await contentEl.scrollToTop(300);
|
27 | contentEl.style.removeProperty('--overflow');
|
28 | });
|
29 | });
|
30 | }
|
31 | });
|
32 | });
|
33 | };
|
34 |
|
35 | export { startStatusTap };
|