@ionic/core 8.4.1-dev.11732742404.1e7b5304 → 8.4.1-dev.11732743645.19f772f4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/hydrate/index.mjs CHANGED
@@ -9240,8 +9240,9 @@ const startFocusVisible = (rootEl) => {
9240
9240
  };
9241
9241
  const onFocusin = (ev) => {
9242
9242
  console.log('onFocusin', ev);
9243
+ let toFocus = [];
9243
9244
  if (keyboardMode && ev.composedPath !== undefined) {
9244
- const toFocus = ev.composedPath().filter((el) => {
9245
+ toFocus = ev.composedPath().filter((el) => {
9245
9246
  // TODO(FW-2832): type
9246
9247
  if (el.classList) {
9247
9248
  return el.classList.contains(ION_FOCUSABLE);
@@ -9250,7 +9251,9 @@ const startFocusVisible = (rootEl) => {
9250
9251
  });
9251
9252
  setFocus(toFocus);
9252
9253
  }
9253
- keyboardMode = true;
9254
+ if (toFocus.length > 0) {
9255
+ keyboardMode = true;
9256
+ }
9254
9257
  };
9255
9258
  const onFocusout = () => {
9256
9259
  console.log('onFocusout');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ionic/core",
3
- "version": "8.4.1-dev.11732742404.1e7b5304",
3
+ "version": "8.4.1-dev.11732743645.19f772f4",
4
4
  "description": "Base components for Ionic",
5
5
  "keywords": [
6
6
  "ionic",
@@ -1,4 +0,0 @@
1
- /*!
2
- * (C) Ionic http://ionicframework.com - MIT License
3
- */
4
- var ION_FOCUSED="ion-focused";var ION_FOCUSABLE="ion-focusable";var FOCUS_KEYS=["Tab","ArrowDown","Space","Escape"," ","Shift","Enter","ArrowLeft","ArrowRight","ArrowUp","Home","End","Meta"];var startFocusVisible=function(o){var n=[];var r=true;var t=o?o.shadowRoot:document;var e=o?o:document.body;var u=function(o){console.log("setFocus",o,n);n.forEach((function(o){return o.classList.remove(ION_FOCUSED)}));o.forEach((function(o){return o.classList.add(ION_FOCUSED)}));n=o};var c=function(o){console.log("pointerDown",o);r=false;u([])};var s=function(o){console.log("onKeydown",o);r=FOCUS_KEYS.includes(o.key);if(!r){u([])}};var i=function(o){console.log("onFocusin",o);if(r&&o.composedPath!==undefined){var n=o.composedPath().filter((function(o){if(o.classList){return o.classList.contains(ION_FOCUSABLE)}return false}));u(n)}r=true};var a=function(){console.log("onFocusout");if(t.activeElement===e){u([])}};t.addEventListener("keydown",s);t.addEventListener("focusin",i);t.addEventListener("focusout",a);t.addEventListener("touchstart",c,{passive:true});t.addEventListener("mousedown",c);var f=function(){t.removeEventListener("keydown",s);t.removeEventListener("focusin",i);t.removeEventListener("focusout",a);t.removeEventListener("touchstart",c);t.removeEventListener("mousedown",c)};return{destroy:f,setFocus:u}};export{startFocusVisible};
@@ -1,4 +0,0 @@
1
- /*!
2
- * (C) Ionic http://ionicframework.com - MIT License
3
- */
4
- const o="ion-focused",n=["Tab","ArrowDown","Space","Escape"," ","Shift","Enter","ArrowLeft","ArrowRight","ArrowUp","Home","End","Meta"],e=e=>{let s=[],t=!0;const c=e?e.shadowRoot:document,u=e||document.body,r=n=>{console.log("setFocus",n,s),s.forEach((n=>n.classList.remove(o))),n.forEach((n=>n.classList.add(o))),s=n},d=o=>{console.log("pointerDown",o),t=!1,r([])},i=o=>{console.log("onKeydown",o),t=n.includes(o.key),t||r([])},w=o=>{if(console.log("onFocusin",o),t&&void 0!==o.composedPath){const n=o.composedPath().filter((o=>!!o.classList&&o.classList.contains("ion-focusable")));r(n)}t=!0},f=()=>{console.log("onFocusout"),c.activeElement===u&&r([])};return c.addEventListener("keydown",i),c.addEventListener("focusin",w),c.addEventListener("focusout",f),c.addEventListener("touchstart",d,{passive:!0}),c.addEventListener("mousedown",d),{destroy:()=>{c.removeEventListener("keydown",i),c.removeEventListener("focusin",w),c.removeEventListener("focusout",f),c.removeEventListener("touchstart",d),c.removeEventListener("mousedown",d)},setFocus:r}};export{e as startFocusVisible}
@@ -1,4 +0,0 @@
1
- /*!
2
- * (C) Ionic http://ionicframework.com - MIT License
3
- */
4
- System.register([],(function(o){"use strict";return{execute:function(){var n="ion-focused";var t="ion-focusable";var r=["Tab","ArrowDown","Space","Escape"," ","Shift","Enter","ArrowLeft","ArrowRight","ArrowUp","Home","End","Meta"];var e=o("startFocusVisible",(function(o){var e=[];var u=true;var c=o?o.shadowRoot:document;var s=o?o:document.body;var i=function(o){console.log("setFocus",o,e);e.forEach((function(o){return o.classList.remove(n)}));o.forEach((function(o){return o.classList.add(n)}));e=o};var f=function(o){console.log("pointerDown",o);u=false;i([])};var a=function(o){console.log("onKeydown",o);u=r.includes(o.key);if(!u){i([])}};var v=function(o){console.log("onFocusin",o);if(u&&o.composedPath!==undefined){var n=o.composedPath().filter((function(o){if(o.classList){return o.classList.contains(t)}return false}));i(n)}u=true};var d=function(){console.log("onFocusout");if(c.activeElement===s){i([])}};c.addEventListener("keydown",a);c.addEventListener("focusin",v);c.addEventListener("focusout",d);c.addEventListener("touchstart",f,{passive:true});c.addEventListener("mousedown",f);var w=function(){c.removeEventListener("keydown",a);c.removeEventListener("focusin",v);c.removeEventListener("focusout",d);c.removeEventListener("touchstart",f);c.removeEventListener("mousedown",f)};return{destroy:w,setFocus:i}}))}}}));