From c43ce2cf2677f3c22e1432320b16dfdedb43b706 Mon Sep 17 00:00:00 2001 From: Fomafix Date: Tue, 29 Apr 2014 19:02:30 +0000 Subject: [PATCH] jquery.suggestions: Use body width instead of full document width When there is a overflowing element in the content, the width of the "document" is wider than the visible width within the browser window. Use instead of document. This reverts 4d799b48 (a fix for bug 45668). Bug: 54091 Bug: 64233 Change-Id: I5268eaf7307159b2eaa4c5749346aa562574a6e2 --- resources/src/jquery/jquery.suggestions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/src/jquery/jquery.suggestions.js b/resources/src/jquery/jquery.suggestions.js index 7d200ff93e..e395a511ee 100644 --- a/resources/src/jquery/jquery.suggestions.js +++ b/resources/src/jquery/jquery.suggestions.js @@ -232,7 +232,7 @@ $.suggestions = { } else { // Expand from right newCSS.left = 'auto'; - newCSS.right = $( document ).width() - ( context.config.$region.offset().left + context.config.$region.outerWidth() ); + newCSS.right = $( 'body' ).width() - ( context.config.$region.offset().left + context.config.$region.outerWidth() ); } context.data.$container.css( newCSS ); -- 2.20.1