Files
doneit-web/_platforms/browser/www/7089-es2015.675f2f2f482fddae7099.js
T

1 line
798 B
JavaScript
Raw Normal View History

2021-08-18 18:58:02 +01:00
(self.webpackChunkgabinete_digital=self.webpackChunkgabinete_digital||[]).push([[7089],{37089:function(e,t,s){"use strict";s.r(t),s.d(t,{startFocusVisible:function(){return o}});const n=["Tab","ArrowDown","Space","Escape"," ","Shift","Enter","ArrowLeft","ArrowRight","ArrowUp"],o=()=>{let e=[],t=!0;const s=document,o=t=>{e.forEach(e=>e.classList.remove("ion-focused")),t.forEach(e=>e.classList.add("ion-focused")),e=t},i=()=>{t=!1,o([])};s.addEventListener("keydown",e=>{t=n.includes(e.key),t||o([])}),s.addEventListener("focusin",e=>{if(t&&e.composedPath){const t=e.composedPath().filter(e=>!!e.classList&&e.classList.contains("ion-focusable"));o(t)}}),s.addEventListener("focusout",()=>{s.activeElement===s.body&&o([])}),s.addEventListener("touchstart",i),s.addEventListener("mousedown",i)}}}]);