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