Skip to content

Commit 7a39ba5

Browse files
committed
(fix) Check for Node.contains method avalaibility
`Node.contains` is not supported in FireFox < 9. Allows trapping the focus inside the overlay to work as expected.
1 parent 1d368f6 commit 7a39ba5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/baguetteBox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
};
126126

127127
var trapFocusInsideOverlay = function(event) {
128-
if (overlay.style.display === 'block' && !overlay.contains(event.target)) {
128+
if (overlay.style.display === 'block' && (overlay.contains && !overlay.contains(event.target))) {
129129
event.stopPropagation();
130130
initFocus();
131131
}

0 commit comments

Comments
 (0)