UNPKG

@ionic/core

Version:
4 lines 984 B
import{__awaiter,__generator}from"tslib"; /*! * (C) Ionic http://ionicframework.com - MIT License */import{d as readTask,w as writeTask}from"./index-527b9e34.js";import{f as findClosestIonContent,s as scrollToTop}from"./index-e919e353.js";import{c as componentOnReady}from"./helpers-78efeec3.js";import"./index-738d7504.js";import"./ionic-global-ca86cf32.js";var startStatusTap=function(){var o=window;o.addEventListener("statusTap",(function(){readTask((function(){var t=o.innerWidth;var r=o.innerHeight;var n=document.elementFromPoint(t/2,r/2);if(!n){return}var e=findClosestIonContent(n);if(e){new Promise((function(o){return componentOnReady(e,o)})).then((function(){writeTask((function(){return __awaiter(void 0,void 0,void 0,(function(){return __generator(this,(function(o){switch(o.label){case 0:e.style.setProperty("--overflow","hidden");return[4,scrollToTop(e,300)];case 1:o.sent();e.style.removeProperty("--overflow");return[2]}}))}))}))}))}}))}))};export{startStatusTap};