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);