From: Fomafix Date: Tue, 29 Apr 2014 19:02:30 +0000 (+0000) Subject: jquery.suggestions: Use body width instead of full document width X-Git-Tag: 1.31.0-rc.0~15680 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_aide%28?a=commitdiff_plain;h=c43ce2cf2677f3c22e1432320b16dfdedb43b706;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 );