Skip to content

Commit 1a51bf8

Browse files
committed
Merge pull request #31 from maisano/patch-1
Check if modalElement exists in handleFocus.
2 parents 494d7d2 + e898b6b commit 1a51bf8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: lib/helpers/focusManager.js

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ function handleBlur(event) {
1010
function handleFocus(event) {
1111
if (needToFocus) {
1212
needToFocus = false;
13+
if (!modalElement) {
14+
return;
15+
}
1316
// need to see how jQuery shims document.on('focusin') so we don't need the
1417
// setTimeout, firefox doesn't support focusin, if it did, we could focus
1518
// the the element outisde of a setTimeout. Side-effect of this

0 commit comments

Comments
 (0)