Bug 1623888 Comment 23 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Daniel Veditz [:dveditz] from comment #18)
> Maybe we need to make sure we always put a LTR marker (\u200E) in front when we strip the scheme (a RTL scheme would be invalid since schemes must be ASCII).

That's a good idea, I'll check what's tests situation with such a change, it's a bit more risky because we add a char that the user didn't type, but may be feasible.

Also, currently we try to format user typed strings as urls when the urlbar is unfocused, for example if you paste the above url and unfocus the urlbar, we format the url? Bug 1577539 is about stop de-emphasizing but until then we should still handle a formatted url properly when we don't strip.
(In reply to Daniel Veditz [:dveditz] from comment #18)
> Maybe we need to make sure we always put a LTR marker (\u200E) in front when we strip the scheme (a RTL scheme would be invalid since schemes must be ASCII).

That's a good idea, I'll check what's tests situation with such a change, it's a bit more risky because we add a char that the user didn't type, but may be feasible.

Also, currently we try to format user typed strings as urls when the urlbar is unfocused, for example if you paste the above url and unfocus the urlbar, we format the "url". Bug 1577539 is about stop de-emphasizing but until then we should still handle a formatted url properly when we don't strip.
(In reply to Daniel Veditz [:dveditz] from comment #18)
> Maybe we need to make sure we always put a LTR marker (\u200E) in front when we strip the scheme (a RTL scheme would be invalid since schemes must be ASCII).

On a second thought, it's a lot more complicate and risky than expected, because adding a char breaks all of the code assumption we make about selection indices. It would very likely introduce many subtle bugs and maintenance costs, we used to have textValue and value in the past for the urlbar, and it was a lot of added complication, while today value is the same as the input field value. I think we should retain this simplification for now and keep enforcing LTR through css.

Back to Bug 1623888 Comment 23