VisualEditor: Link inspector input text always has LTR direction
Closed, ResolvedPublic

Description

Steps:

  1. Write some text in VisualEditor in the Hebrew Wikipedia.
  1. Select a word.
  1. Press the link button in the toolbar. A small link insertion panel appears.

Observed: The direction of the <input> element for the link is ltr.

Expected: The direction of the <input> element for the link is supposed to be rtl.

Comment: It does make sense to set ltr direction by default for external links (http://www.example.com). For internal links the default direction should be the same as that of that Wikipedia's content language.


Version: unspecified
Severity: normal

bzimport set Reference to bz47717.
Amire80 created this task.Via LegacyApr 26 2013, 9:54 AM
Jdforrester-WMF added a comment.Via ConduitApr 30 2013, 1:56 AM

(In reply to comment #0)

Comment: It does make sense to set ltr direction by default for external
links (http://www.example.com). For internal links the default direction should
be the same as that of that Wikipedia's content language.

Eurgh. That's a real mess of a user interaction - in an RTL locale, it starts as RTL, but then you type enough of a string that looks a bit like "http?://www" it magically switches to LTR? What about when your wiki page that you're internally linking to is http://www.amazon.com - do you show as LTR even though it's actually an internal link? How does this get handled in other software?

Amire80 added a comment.Via ConduitApr 30 2013, 5:36 AM

(In reply to comment #1)

Eurgh. That's a real mess of a user interaction - in an RTL locale, it starts
as RTL, but then you type enough of a string that looks a bit like
"http?://www" it magically switches to LTR?

This is not such a mess as a matter of fact. This works very well in GMail chat, for example. If you start typing Hebrew characters, it switches the input box to RTL and vice versa. It also goes further: if you type a few Hebrew characters, and then a lot of Latin characters, it switches to LTR.

BUT -and this is very important- it is not forced: the user can switch the direction later manually. In most Windows browsers it's done using Ctrl-Shift, in Firefox on Windows and GNU/Linux it's done using Ctrl-Shift-X. I don't know about Mac browsers, but it's probably something similar. (I do know that it's impossible on Chrome in Linux, which is why I almost never use it.)

What about when your wiki page that
you're internally linking to is http://www.amazon.com - do you show as
LTR
even though it's actually an internal link? How does this get handled in
other
software?

Same as above, essentially. One thing that could help here would be a possibility to specify the language of the page and of the title, as in bug 34514. But that's extra icing. For a link insertion dialog it is enough to do automatic detection with a possibility to override manually.

Jdforrester-WMF added a comment.Via ConduitMay 1 2013, 3:03 AM

Moriel wants to take a stab at this one; assigning.

gerritbot added a comment.Via ConduitMay 2 2013, 7:47 AM

Related URL: https://gerrit.wikimedia.org/r/61960 (Gerrit Change Ic13b9c3b155ce2979298cac9518c7419b9d45bac)

Jdforrester-WMF added a comment.Via ConduitMay 2 2013, 9:15 PM

Merged in Moriel's fix (thanks!).

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.