Mooeypoo has uploaded a new change for review. https://gerrit.wikimedia.org/r/187052
Change subject: Set input direction in html prop rather than css rule ...................................................................... Set input direction in html prop rather than css rule To make sure that the rule is strictly adhered to and is not being overriden by other css rules, the input should receive the direction it is set for. Since input doesn't have children it is not an issue of inheritance and other CSS rules. Bug: T87637 Change-Id: Ib0b7cb38b123fdb2bf414672a9619c59679d4fd2 --- M src/widgets/InputWidget.js 1 file changed, 1 insertion(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/52/187052/1 diff --git a/src/widgets/InputWidget.js b/src/widgets/InputWidget.js index 02fac7a..e9044dd 100644 --- a/src/widgets/InputWidget.js +++ b/src/widgets/InputWidget.js @@ -99,13 +99,7 @@ * @param {boolean} isRTL */ OO.ui.InputWidget.prototype.setRTL = function ( isRTL ) { - if ( isRTL ) { - this.$input.removeClass( 'oo-ui-ltr' ); - this.$input.addClass( 'oo-ui-rtl' ); - } else { - this.$input.removeClass( 'oo-ui-rtl' ); - this.$input.addClass( 'oo-ui-ltr' ); - } + this.$input.prop( 'dir', isRTL ? 'rtl' : 'ltr' ); }; /** -- To view, visit https://gerrit.wikimedia.org/r/187052 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib0b7cb38b123fdb2bf414672a9619c59679d4fd2 Gerrit-PatchSet: 1 Gerrit-Project: oojs/ui 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