From 0aff703f9824cefd0c2fd8221bd2295e952699bb Mon Sep 17 00:00:00 2001 From: Facundo Maldonado Date: Wed, 11 Dec 2013 13:56:18 -0300 Subject: Change how scrollShift is calculated In Firefox $('body').scrollTop returns 0, that's why the modal appear outside the visible screen. Added $('hmtl).scrollTop. var scrollShift = $('body').scrollTop() || $('html').scrollTop() Closes-Bug: 1251361 Change-Id: Icf691eb140e091615a98f1fbd415428cd418ba9e (cherry picked from commit 8950b90d1777e265f98379098cebef7517642efe) --- horizon/static/horizon/js/horizon.modals.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/horizon/static/horizon/js/horizon.modals.js b/horizon/static/horizon/js/horizon.modals.js index e07bd4d16..ac00710af 100644 --- a/horizon/static/horizon/js/horizon.modals.js +++ b/horizon/static/horizon/js/horizon.modals.js @@ -135,7 +135,7 @@ horizon.addInitFunction(function() { $(document).on('show', '.modal', function (evt) { // Filter out indirect triggers of "show" from (for example) tabs. if ($(evt.target).hasClass("modal")) { - var scrollShift = $('body').scrollTop(), + var scrollShift = $('body').scrollTop() || $('html').scrollTop(), $this = $(this), topVal = $this.css('top'); $this.css('top', scrollShift + parseInt(topVal, 10)); -- cgit v1.2.1