Amire80 has uploaded a new change for review.
https://gerrit.wikimedia.org/r/93512
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, 6 insertions(+), 9 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase
refs/changes/12/93512/1
diff --git
a/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.Interface.js
b/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.Interface.js
index 1ab0633..2a9f19b 100644
--- a/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.Interface.js
+++ b/lib/resources/wikibase.ui.PropertyEditTool.EditableValue.Interface.js
@@ -207,15 +207,12 @@
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 computer 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: newchange
Gerrit-Change-Id: I80b9ab02840617931b9070d101e324c5a01cd70f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Amire80 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits