@strands.gg/accui 2.11.28 → 2.11.30
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/dist/index.cjs.js +1 -1
- package/dist/index.es.js +5 -2
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -2158,6 +2158,9 @@ function useFloatingPosition(options) {
|
|
|
2158
2158
|
const handleScroll = () => {
|
|
2159
2159
|
updatePosition();
|
|
2160
2160
|
if (clickOutside?.enabled && clickOutside.handler && trigger.value) {
|
|
2161
|
+
if (typeof trigger.value.getBoundingClientRect !== "function") {
|
|
2162
|
+
return;
|
|
2163
|
+
}
|
|
2161
2164
|
const triggerRect = trigger.value.getBoundingClientRect();
|
|
2162
2165
|
const viewportHeight = window.innerHeight;
|
|
2163
2166
|
const viewportWidth = window.innerWidth;
|
|
@@ -2186,10 +2189,10 @@ function useFloatingPosition(options) {
|
|
|
2186
2189
|
updatePosition();
|
|
2187
2190
|
});
|
|
2188
2191
|
nextTick(() => {
|
|
2189
|
-
if (trigger.value && resizeObserver) {
|
|
2192
|
+
if (trigger.value && resizeObserver && typeof trigger.value.getBoundingClientRect === "function") {
|
|
2190
2193
|
resizeObserver.observe(trigger.value);
|
|
2191
2194
|
}
|
|
2192
|
-
if (floating.value && resizeObserver) {
|
|
2195
|
+
if (floating.value && resizeObserver && typeof floating.value.getBoundingClientRect === "function") {
|
|
2193
2196
|
resizeObserver.observe(floating.value);
|
|
2194
2197
|
}
|
|
2195
2198
|
});
|