Bug 1598175 Comment 13 Edit History

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

There's also RTL issues involved here. The problem is the visual representation of a bidi string may move the domain around depending on the presence of one of multiple strong directionality characters.
We have some code trying to predict the position of the domain (start or end), but it's not good enough, bidi rules are more complex (may indeed also end up in the middle).

To solve both problems we may try to use a SELECTION for the domain (pretty much inverting the current situation where we select all the rest to de-emphasize) and use/fix scrollSelectionIntoView of the editor to ensure it is visible.
There's also RTL issues involved here. The problem is the visual representation of a bidi string may move the domain around depending on the presence of one or multiple strong directionality characters.
We have some code trying to predict the position of the domain (start or end), but it's not good enough, bidi rules are more complex (may indeed also end up in the middle).

To solve both problems we may try to use a SELECTION for the domain (pretty much inverting the current situation where we select all the rest to de-emphasize) and use/fix scrollSelectionIntoView of the editor to ensure it is visible.
There's also RTL issues involved here. The problem is the visual representation of a bidi string may move the domain around depending on the presence of one or multiple strong directionality characters.
We have some code trying to predict the position of the domain (start or end), but it's not good enough, bidi rules are more complex (may indeed also end up in the middle).

To solve both problems we may try to use a SELECTION for the domain (pretty much inverting the current situation where we select all the rest to de-emphasize) and use/fix scrollSelectionIntoView of the editor to ensure it is visible.
We could also move the cursor position to the start of the domain, though currently some code (e.g. switching to a tab that had autofill in the urlbar) depends on us preserving the cursor position on blur.

Back to Bug 1598175 Comment 13