From 96c737d1cb1f85ccba9b8f62c96e0b2a7da52dfc Mon Sep 17 00:00:00 2001 From: Michael Terry Date: Tue, 21 Nov 2017 11:16:48 -0500 Subject: [PATCH] Fix focus loss when bookmarking a page in IE In IE, when a user presses the bookmark/remove-bookmark button, the focus was lost on that button because we set disabled=true while we do the operation. Set the focus back when we are done. LEARNER-2896 --- .../static/course_bookmarks/js/views/bookmark_button.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openedx/features/course_bookmarks/static/course_bookmarks/js/views/bookmark_button.js b/openedx/features/course_bookmarks/static/course_bookmarks/js/views/bookmark_button.js index 5dece91125..d1179edfb4 100644 --- a/openedx/features/course_bookmarks/static/course_bookmarks/js/views/bookmark_button.js +++ b/openedx/features/course_bookmarks/static/course_bookmarks/js/views/bookmark_button.js @@ -58,6 +58,7 @@ }, complete: function() { view.$el.prop('disabled', false); + view.$el.focus(); } }); }, @@ -78,6 +79,7 @@ }, complete: function() { view.$el.prop('disabled', false); + view.$el.focus(); } }); }, @@ -105,7 +107,7 @@ } this.messageView.showMessage(errorMsg); - // Hide message automatically after some interval + // Hide message automatically after some interval setTimeout(_.bind(function() { this.messageView.hideMessage(); }, this), this.showBannerInterval);