From 8e69e68ecbfab1b709ef96c5bbed5d5c262e7f3e Mon Sep 17 00:00:00 2001 From: jlukic Date: Mon, 11 May 2015 15:54:24 -0400 Subject: [PATCH] Fixes #2180, right offstage position does not take horizontal scrollbars into consideration --- src/definitions/modules/popup.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/definitions/modules/popup.js b/src/definitions/modules/popup.js index 898130309..2be9aefd8 100644 --- a/src/definitions/modules/popup.js +++ b/src/definitions/modules/popup.js @@ -474,7 +474,7 @@ $.fn.popup = function(parameters) { top : $(window).scrollTop(), bottom : $(window).scrollTop() + $(window).height(), left : 0, - right : $(window).width() + right : $(window).scrollLeft() + $(window).width() }, popup = { width : $popup.width(), @@ -742,7 +742,7 @@ $.fn.popup = function(parameters) { // recursively find new positioning if(offstagePosition) { - module.debug('Popup cant fit into viewport', offstagePosition); + module.debug('Popup cant fit into viewport', position, offstagePosition); if(searchDepth < settings.maxSearchDepth) { searchDepth++; position = module.get.nextPosition(position);