@strands.gg/accui 2.11.30 → 2.11.31
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 +3 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -2174,6 +2174,9 @@ function useFloatingPosition(options) {
|
|
|
2174
2174
|
if (!clickOutside?.enabled || !clickOutside.handler) return;
|
|
2175
2175
|
const target = event.target;
|
|
2176
2176
|
if (!target || !trigger.value || !floating.value) return;
|
|
2177
|
+
if (typeof trigger.value.contains !== "function" || typeof floating.value.contains !== "function") {
|
|
2178
|
+
return;
|
|
2179
|
+
}
|
|
2177
2180
|
const isClickInsideTrigger = trigger.value.contains(target);
|
|
2178
2181
|
const isClickInsideFloating = floating.value.contains(target);
|
|
2179
2182
|
if (!isClickInsideTrigger && !isClickInsideFloating) {
|