@klodd/ds 3.14.5 → 3.14.6
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/css/00-primitives.css +0 -1
- package/css/components/nav.css +1 -1
- package/js/pwa-register.js +14 -19
- package/package.json +1 -1
package/css/00-primitives.css
CHANGED
package/css/components/nav.css
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
================================================================ */
|
|
31
31
|
.bottom-nav {
|
|
32
32
|
position: fixed;
|
|
33
|
-
bottom: calc(var(--safe-bottom) + var(--space-12)
|
|
33
|
+
bottom: calc(var(--safe-bottom) + var(--space-12));
|
|
34
34
|
left: var(--space-16);
|
|
35
35
|
right: var(--space-16);
|
|
36
36
|
z-index: var(--z-nav);
|
package/js/pwa-register.js
CHANGED
|
@@ -62,21 +62,21 @@
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
/*------------------------------------------------------------
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
Permanent fixed-anchor (iOS PWA cold-start safe-area fix)
|
|
66
|
+
En 1x1px osynlig fixed-positionerad div pa <body> som ligger
|
|
67
|
+
kvar hela sidans livstid. WebKit verkar resolva env(safe-area-
|
|
68
|
+
inset-*) korrekt nar det finns minst en aktiv fixed-positioning-
|
|
69
|
+
context i layouten. Tidigare probe-element-iterationer skapade
|
|
70
|
+
+ tog bort - att lamna kvar anchorn ar mer palitligt.
|
|
70
71
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
visual viewport faktiskt slutar.
|
|
72
|
+
aria-hidden + opacity 0 + pointer-events none - inte synligt
|
|
73
|
+
eller upptackt av screen readers / pointer-events.
|
|
74
74
|
------------------------------------------------------------*/
|
|
75
|
-
function
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
doc.
|
|
75
|
+
function insertFixedAnchor() {
|
|
76
|
+
const el = doc.createElement('div');
|
|
77
|
+
el.setAttribute('aria-hidden', 'true');
|
|
78
|
+
el.style.cssText = 'position:fixed;bottom:0;left:0;width:1px;height:1px;opacity:0;pointer-events:none;';
|
|
79
|
+
doc.body.appendChild(el);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
/*------------------------------------------------------------
|
|
@@ -90,10 +90,5 @@
|
|
|
90
90
|
|
|
91
91
|
registerSW(cfg);
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
root.visualViewport.addEventListener('resize', syncNavBottom);
|
|
95
|
-
root.visualViewport.addEventListener('scroll', syncNavBottom);
|
|
96
|
-
}
|
|
97
|
-
doc.addEventListener('DOMContentLoaded', syncNavBottom);
|
|
98
|
-
root.addEventListener('load', syncNavBottom);
|
|
93
|
+
doc.addEventListener('DOMContentLoaded', insertFixedAnchor);
|
|
99
94
|
})(typeof window !== 'undefined' ? window : globalThis, document);
|