aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rwxr-xr-xjs/controllers/styles-controller.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js
index 44ca50e1..7d5dc42b 100755
--- a/js/controllers/styles-controller.js
+++ b/js/controllers/styles-controller.js
@@ -674,8 +674,9 @@ var stylesController = exports.StylesController = Montage.create(Component, {
674 } 674 }
675 675
676 var matchingElements, i; 676 var matchingElements, i;
677
677 for(i = 0; i < specArr.length; i++) { 678 for(i = 0; i < specArr.length; i++) {
678 matchingElements = win.document.querySelectorAll(specArr[i].selector); 679 matchingElements = element.ownerDocument.querySelectorAll(specArr[i].selector);
679 if(nj.toArray(matchingElements).indexOf(element) !== -1) { 680 if(nj.toArray(matchingElements).indexOf(element) !== -1) {
680 return specArr[i]; 681 return specArr[i];
681 } 682 }