Mooeypoo has uploaded a new change for review. https://gerrit.wikimedia.org/r/61749
Change subject: Quickfix for the keyboard icon position in RTL languages ...................................................................... Quickfix for the keyboard icon position in RTL languages This is a rather quick fix for the problem described in the bug attached. The keyboard icon appeared on the right side even in RTL languages which blocked the beginning of the typed words. Bug: 45585 Change-Id: If3ee213daae8cd8e5cefb6daecd19eb3a6da76c9 --- M lib/jquery.ime/jquery.ime.js 1 file changed, 13 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/49/61749/1 diff --git a/lib/jquery.ime/jquery.ime.js b/lib/jquery.ime/jquery.ime.js index 4323068..33404d0 100644 --- a/lib/jquery.ime/jquery.ime.js +++ b/lib/jquery.ime/jquery.ime.js @@ -684,6 +684,10 @@ top = position.top + this.$element.outerHeight(); left = position.left + this.$element.outerWidth() - this.$imeSetting.outerWidth(); + // RTL element position fix: + if ( $( 'html' ).attr( 'dir' ) == 'rtl' || this.$element.attr( 'dir' ) == 'rtl' ) { + left = position.left; + } room = $( window ).height() - top; if ( room < this.$imeSetting.outerHeight() ) { @@ -709,9 +713,15 @@ } ); if ( parseInt( this.$menu.css( 'min-width' ) ) > left ) { - this.$menu - .css( { left: position.left } ) - .addClass( 'right' ); + // RTL element position fix + if ( $( 'html' ).attr( 'dir' ) == 'rtl' || this.$element.attr( 'dir' ) == 'rtl' ) { + this.$menu + .css( { left: 0 } ) + } else { + this.$menu + .css( { left: position.left } ) + .addClass( 'right' ); + } } }, -- To view, visit https://gerrit.wikimedia.org/r/61749 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If3ee213daae8cd8e5cefb6daecd19eb3a6da76c9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Mooeypoo <mor...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits