Merge "mediawiki.searchSuggest: Show full article title as a tooltip for each suggestion"
[lhc/web/wiklou.git] / resources / src / jquery / jquery.suggestions.js
index 7d200ff..a20a948 100644 (file)
@@ -215,10 +215,10 @@ $.suggestions = {
                                                        }
 
                                                        if ( expandFrom === 'start' ) {
-                                                               expandFrom = docDir === 'rtl' ? 'right': 'left';
+                                                               expandFrom = docDir === 'rtl' ? 'right' : 'left';
 
                                                        } else if ( expandFrom === 'end' ) {
-                                                               expandFrom = docDir === 'rtl' ? 'left': 'right';
+                                                               expandFrom = docDir === 'rtl' ? 'left' : 'right';
                                                        }
 
                                                        return expandFrom;
@@ -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 );