Santhosh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/70588


Change subject: Update jquery.ime from upstream
......................................................................

Update jquery.ime from upstream

Version:  v0.1.0+20130626

Bug: 49679
Change-Id: I310ef317118fadbb7a2b9da00611dfd04860f964
---
M lib/jquery.ime/jquery.ime.js
1 file changed, 10 insertions(+), 9 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector 
refs/changes/88/70588/1

diff --git a/lib/jquery.ime/jquery.ime.js b/lib/jquery.ime/jquery.ime.js
index f252ba5..73b67c4 100644
--- a/lib/jquery.ime/jquery.ime.js
+++ b/lib/jquery.ime/jquery.ime.js
@@ -1,4 +1,4 @@
-/*! jquery.ime - v0.1.0+20130625
+/*! jquery.ime - v0.1.0+20130626
 * https://github.com/wikimedia/jquery.ime
 * Copyright (c) 2013 Santhosh Thottingal; Licensed GPL, MIT */
 ( function ( $ ) {
@@ -704,7 +704,7 @@
                 */
                position: function () {
                        var imeSelector = this,
-                               position, top, left, room;
+                               menutop, position, top, left, room;
 
                        this.focus(); // shows the trigger in case it is hidden
 
@@ -726,13 +726,14 @@
 
                        if ( room < this.$imeSetting.outerHeight() ) {
                                top = position.top - 
this.$imeSetting.outerHeight();
-
-                               this.$menu
-                                       .addClass( 'position-top' )
-                                       .css( 'top',
-                                               - ( this.$menu.outerHeight() +
-                                               this.$imeSetting.outerHeight() )
-                                       );
+                               menutop = his.$menu.outerHeight() +
+                                       this.$imeSetting.outerHeight()
+                               // Flip the menu to top if menu can fit in the 
space there.
+                               if ( menutop < top ) {
+                                       this.$menu
+                                               .addClass( 'position-top' )
+                                               .css( 'top', -menutop );
+                               }
                        }
 
                        this.$element.parents().each( function() {

-- 
To view, visit https://gerrit.wikimedia.org/r/70588
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I310ef317118fadbb7a2b9da00611dfd04860f964
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to