1
0
Эх сурвалжийг харах

fix: Fix Sizzle incorrect context in iframe, passed as context of iframe

赵思 2 жил өмнө
parent
commit
727b136583

+ 2 - 1
src/utils/FindElement.js

@@ -25,7 +25,8 @@ class FindElement {
       : data.selector;
 
     if (specialSelectorsRegex.test(selector)) {
-      const elements = Sizzle.matches(selector);
+      // Fix Sizzle incorrect context in iframe, passed as context of iframe
+      const elements = Sizzle(selector, documentCtx);
       if (!elements) return null;
 
       return data.multiple ? elements : elements[0];