jenkins-bot has submitted this change and it was merged. Change subject: Update jquery.ime to 806deb2 ......................................................................
Update jquery.ime to 806deb2 Changes: * README update to point about writing tests for IMEs. * Take scrollTop/scrollLeft into account when positioning. Change-Id: Ie39fb3f7f9f944e0186b74a51812e4d424174051 --- M lib/jquery.ime/jquery.ime.js M lib/jquery.ime/rules/README.md 2 files changed, 10 insertions(+), 6 deletions(-) Approvals: Santhosh: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/jquery.ime/jquery.ime.js b/lib/jquery.ime/jquery.ime.js index a191683..65cad41 100644 --- a/lib/jquery.ime/jquery.ime.js +++ b/lib/jquery.ime/jquery.ime.js @@ -1,4 +1,4 @@ -/*! jquery.ime - v0.1.0+20141028 +/*! jquery.ime - v0.1.0+20141229 * https://github.com/wikimedia/jquery.ime * Copyright (c) 2014 Santhosh Thottingal; Licensed GPL, MIT */ ( function ( $ ) { @@ -1026,7 +1026,7 @@ */ position: function () { var menuWidth, menuTop, menuLeft, elementPosition, - top, left, verticalRoom, overflowsOnRight, + top, left, cssTop, cssLeft, verticalRoom, overflowsOnRight, imeSelector = this, rtlElement = this.$element.css( 'direction' ) === 'rtl', $window = $( window ); @@ -1062,21 +1062,24 @@ } } + cssTop = top; + cssLeft = left; this.$element.parents().each( function() { if ( $( this ).css( 'position' ) === 'fixed' ) { imeSelector.$imeSetting.css( 'position', 'fixed' ); - + cssTop -= $( document ).scrollTop(); + cssLeft -= $( document ).scrollLeft(); return false; } } ); this.$imeSetting.css( { - top: top, - left: left + top: cssTop, + left: cssLeft } ); menuWidth = this.$menu.width(); - overflowsOnRight = ( left + menuWidth ) > $window.width(); + overflowsOnRight = ( left - $( document ).scrollLeft() + menuWidth ) > $window.width(); // Adjust horizontal position if there's // not enough space on any side diff --git a/lib/jquery.ime/rules/README.md b/lib/jquery.ime/rules/README.md index 6197920..b178934 100644 --- a/lib/jquery.ime/rules/README.md +++ b/lib/jquery.ime/rules/README.md @@ -105,3 +105,4 @@ For complete examples, please refer the existing input method definitions. +Documentation of input methods are available at https://www.mediawiki.org/wiki/Help:Extension:UniversalLanguageSelector/Input_methods -- To view, visit https://gerrit.wikimedia.org/r/182064 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ie39fb3f7f9f944e0186b74a51812e4d424174051 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: KartikMistry <kartik.mis...@gmail.com> Gerrit-Reviewer: Amire80 <amir.ahar...@mail.huji.ac.il> Gerrit-Reviewer: Santhosh <santhosh.thottin...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits