Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit 0a7ded9

Browse files
ErinCoughlanjelbourn
authored andcommitted
fix(dialog): fix focus trap sometimes not working.
Closes #6590
1 parent d1b7f79 commit 0a7ded9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/dialog/dialog.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,9 @@ function MdDialogProvider($$interimElementProvider) {
877877

878878
// When focus is about to move out of the dialog, we want to intercept it and redirect it
879879
// back to the dialog element.
880-
var focusHandler = angular.bind(element, element.focus);
880+
var focusHandler = function() {
881+
element.focus();
882+
};
881883
topFocusTrap.addEventListener('focus', focusHandler);
882884
bottomFocusTrap.addEventListener('focus', focusHandler);
883885

0 commit comments

Comments
 (0)