Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Make sure a valid ShadowRoot or Document is returned from target.owner
Browse files Browse the repository at this point in the history
Fixes #115
  • Loading branch information
dfreedm committed Jan 7, 2014
1 parent 26c93b7 commit 8045762
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@
while (s.parentNode) {
s = s.parentNode;
}
// the owner element is expected to be a Document or ShadowRoot
if (s.nodeType != Node.DOCUMENT_NODE && s.nodeType != Node.DOCUMENT_FRAGMENT_NODE) {
s = document;
}
return s;
},
findTarget: function(inEvent) {
Expand Down

0 comments on commit 8045762

Please sign in to comment.