lupine.components 1.1.43 → 1.1.44
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/package.json +1 -1
- package/src/frames/slider-frame.tsx +14 -2
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
</div>
|
|
13
13
|
);
|
|
14
14
|
*/
|
|
15
|
-
import { VNode, CssProps, HtmlVar, RefProps, stopPropagation, MediaQueryRange } from 'lupine.components';
|
|
15
|
+
import { VNode, CssProps, HtmlVar, RefProps, stopPropagation, MediaQueryRange, isFrontEnd } from 'lupine.components';
|
|
16
16
|
|
|
17
17
|
// addClass(SliderFramePosition) is used to show two SliderFrames for big screens,
|
|
18
18
|
// so when the second is showing, it needs to set this on the first one
|
|
@@ -58,7 +58,19 @@ export const SliderFrame = (props: SliderFrameProps) => {
|
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
60
|
const dom = new HtmlVar(<div class='slider-frame-default'>{props.defaultContent || '(No Content)'}</div>);
|
|
61
|
-
const ref: RefProps = {
|
|
61
|
+
const ref: RefProps = {
|
|
62
|
+
onLoad: async (el: Element) => {
|
|
63
|
+
// Keep fixed sliders out of padded/top-frame layout containers on iOS.
|
|
64
|
+
// iOS WebView can treat fixed children inside safe-area padded app frames inconsistently;
|
|
65
|
+
// mounting the slider at body level also makes z-index compare globally.
|
|
66
|
+
if (isFrontEnd()) {
|
|
67
|
+
const root = (window.parent as any).document.querySelector('.lupine-root') as HTMLElement;
|
|
68
|
+
if (root && el.parentElement !== root) {
|
|
69
|
+
root.appendChild(el);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
};
|
|
62
74
|
const css: CssProps = {
|
|
63
75
|
display: 'flex',
|
|
64
76
|
flexDirection: 'column',
|