From a5c2a5b0614e967e24df86b259cd741fd70a90e6 Mon Sep 17 00:00:00 2001 From: Jeffrey Hamans Date: Fri, 18 Dec 2015 12:19:35 +0100 Subject: [PATCH] fix(modal): add focus check for IE - Check if element has focus method due to IE issues Closes #5097 Fixes #5096 --- src/modal/modal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modal/modal.js b/src/modal/modal.js index 7b740fa1ca..25e0d16bb2 100644 --- a/src/modal/modal.js +++ b/src/modal/modal.js @@ -308,7 +308,7 @@ angular.module('ui.bootstrap.modal', ['ui.bootstrap.stackedMap']) //move focus to specified element if available, or else to body if (elementToReceiveFocus && elementToReceiveFocus.focus) { elementToReceiveFocus.focus(); - } else { + } else if (appendToElement.focus) { appendToElement.focus(); } }