jenkins-bot has submitted this change and it was merged.
Change subject: Correct and simplify direction setting for propertyedittool
......................................................................
Correct and simplify direction setting for propertyedittool
Get the direction from CSS rather than HTML, to make sure
that it's defined and explicit rather than 'auto'.
Since 'direction' is always expected to be defined, there's
no reason to have the undefined test.
Currently, the <input> gets dir='auto', which doesn't actually
do the right thing in browsers.
Change-Id: I80b9ab02840617931b9070d101e324c5a01cd70f
---
M lib/resources/wikibase.ui.PropertyEditTool.EditableValue.Interface.js
1 file changed, 5 insertions(+), 9 deletions(-)
Approvals:
Henning Snater: Looks good to me, approved
jenkins-bot: Verified
diff --git
a/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.Interface.js
b/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.Interface.js
index 1ab0633..25ffca8 100644
--- a/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.Interface.js
+++ b/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.Interface.js
@@ -207,15 +207,11 @@
if ( lang === undefined ) {
lang = mw.config.get( 'wgUserLanguage' );
}
- var dir = this.getSubject().attr( 'dir' );
- if ( dir === undefined ) {
- if ( wb.getLanguages()[lang] !== undefined ) {
- dir = $.uls.data.getDir( lang );
- }
- }
- if ( dir === undefined ) {
- dir = 'auto'; // Shouldn't happen, but go figure
- }
+
+ // Get the computed dir from CSS, to make sure that
it's explicit and not 'auto', which
+ // is less useful for <input>:
+ var dir = this.getSubject().css( 'direction' );
+
this._inputElem.attr( 'lang', lang ).attr( 'dir', dir );
}
},
--
To view, visit https://gerrit.wikimedia.org/r/93512
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I80b9ab02840617931b9070d101e324c5a01cd70f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Amire80 <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Henning Snater <[email protected]>
Gerrit-Reviewer: Tobias Gritschacher <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits