From bbbec136067c9ee70cef8b35a1f211c0bf39d5e4 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 10 Oct 2014 13:09:05 -0400 Subject: [PATCH] FIX: Cursor would stay on lightbox when hitting the back button --- app/assets/javascripts/discourse/routes/discourse_route.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/routes/discourse_route.js b/app/assets/javascripts/discourse/routes/discourse_route.js index 2302716085a..4beffeacef3 100644 --- a/app/assets/javascripts/discourse/routes/discourse_route.js +++ b/app/assets/javascripts/discourse/routes/discourse_route.js @@ -100,7 +100,10 @@ Discourse.Route.reopenClass({ $('header ul.icons li').removeClass('active'); $('[data-toggle="dropdown"]').parent().removeClass('open'); // close the lightbox - if ($.magnificPopup && $.magnificPopup.instance) { $.magnificPopup.instance.close(); } + if ($.magnificPopup && $.magnificPopup.instance) { + $.magnificPopup.instance.close(); + $('body').removeClass('mfp-zoom-out-cur'); + } // Remove any link focus // NOTE: the '.not("body")' is here to prevent a bug in IE10 on Win7