diff options
Diffstat (limited to 'js/controllers')
-rwxr-xr-x | js/controllers/styles-controller.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/js/controllers/styles-controller.js b/js/controllers/styles-controller.js index 71e2c7f9..885d710f 100755 --- a/js/controllers/styles-controller.js +++ b/js/controllers/styles-controller.js | |||
@@ -678,8 +678,9 @@ var stylesController = exports.StylesController = Montage.create(Component, { | |||
678 | } | 678 | } |
679 | 679 | ||
680 | var matchingElements, i; | 680 | var matchingElements, i; |
681 | |||
681 | for(i = 0; i < specArr.length; i++) { | 682 | for(i = 0; i < specArr.length; i++) { |
682 | matchingElements = win.document.querySelectorAll(specArr[i].selector); | 683 | matchingElements = element.ownerDocument.querySelectorAll(specArr[i].selector); |
683 | if(nj.toArray(matchingElements).indexOf(element) !== -1) { | 684 | if(nj.toArray(matchingElements).indexOf(element) !== -1) { |
684 | return specArr[i]; | 685 | return specArr[i]; |
685 | } | 686 | } |