From 2cccc0889f63503d3a56ed80b3f0cde3424a5aff Mon Sep 17 00:00:00 2001 From: fat Date: Wed, 17 Jul 2013 21:30:38 -0700 Subject: make sure triggering element is visible before focusing #7521 --- js/modal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/modal.js b/js/modal.js index 81766b323..7433de4c8 100644 --- a/js/modal.js +++ b/js/modal.js @@ -232,7 +232,7 @@ $target .modal(option) .one('hide', function () { - $this.focus() + $this.is(':visible') && $this.focus() }) }) -- cgit v1.2.3