ss-support-widget 1.0.6 → 1.0.8
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/ChatWidget.tsx +22 -1
package/package.json
CHANGED
package/src/ChatWidget.tsx
CHANGED
|
@@ -54,6 +54,22 @@ export function ChatWidget({
|
|
|
54
54
|
endRef.current?.scrollIntoView({ behavior: "auto", block: "end" });
|
|
55
55
|
}, [open]);
|
|
56
56
|
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
if (!(open && isMobile)) return;
|
|
59
|
+
|
|
60
|
+
const prevOverflow = document.documentElement.style.overflow;
|
|
61
|
+
const prevBodyOverflow = document.body.style.overflow;
|
|
62
|
+
|
|
63
|
+
document.documentElement.style.overflow = "hidden";
|
|
64
|
+
document.body.style.overflow = "hidden";
|
|
65
|
+
|
|
66
|
+
return () => {
|
|
67
|
+
document.documentElement.style.overflow = prevOverflow;
|
|
68
|
+
document.body.style.overflow = prevBodyOverflow;
|
|
69
|
+
};
|
|
70
|
+
}, [open, isMobile]);
|
|
71
|
+
|
|
72
|
+
|
|
57
73
|
return (
|
|
58
74
|
<Box sx={anchorSx}>
|
|
59
75
|
{!open && (
|
|
@@ -106,7 +122,7 @@ export function ChatWidget({
|
|
|
106
122
|
borderColor: "divider",
|
|
107
123
|
background:
|
|
108
124
|
"linear-gradient(135deg, rgba(25,118,210,.18), rgba(156,39,176,.14))",
|
|
109
|
-
backdropFilter: "blur(10px)",
|
|
125
|
+
backdropFilter: isMobile ? "none" : "blur(10px)",
|
|
110
126
|
}}
|
|
111
127
|
>
|
|
112
128
|
<Badge
|
|
@@ -172,6 +188,8 @@ export function ChatWidget({
|
|
|
172
188
|
border: "3px solid transparent",
|
|
173
189
|
backgroundClip: "content-box",
|
|
174
190
|
},
|
|
191
|
+
overscrollBehavior: "contain",
|
|
192
|
+
WebkitOverflowScrolling: "touch",
|
|
175
193
|
}}
|
|
176
194
|
>
|
|
177
195
|
{msgs.map((m) => {
|
|
@@ -343,6 +361,9 @@ export function ChatWidget({
|
|
|
343
361
|
|
|
344
362
|
<Box
|
|
345
363
|
sx={{
|
|
364
|
+
position: "sticky",
|
|
365
|
+
bottom: 0,
|
|
366
|
+
zIndex: 2,
|
|
346
367
|
p: 1.25,
|
|
347
368
|
borderTop: "1px solid",
|
|
348
369
|
borderColor: "divider",
|