Closed Bug 1322542 Opened 8 years ago Closed 5 years ago

[RTL] LTR behavior with the cursor when typing RTL characters in the URL bar

Categories

(Firefox :: Address Bar, defect, P3)

defect

Tracking

()

VERIFIED FIXED
Firefox 73
Tracking Status
firefox61 --- wontfix
firefox62 --- wontfix
firefox63 --- wontfix
firefox73 --- verified

People

(Reporter: itiel_yn8, Assigned: itiel_yn8)

References

Details

(Keywords: rtl, Whiteboard: [fxsearch])

Attachments

(4 files, 1 obsolete file)

STR: 1. Type any RTL characters in the URL bar, for example: ניסיון (for those who copy-pasted the word above, click the End key in the keyboard) 2. Press the space key in the keyboard 3. Observe the cursor's location Actual result: The cursor goes (only visually) to the beginning of the string (rightmost) Expected result: The cursor should stay where the user recently pressed the space key (leftmost) Google Chrome behaves okay in this regard.
Attached file HTML demo (obsolete) —
(In reply to ItielMaN from comment #0) > STR: > 1. Type any RTL characters in the URL bar, for example: ניסיון > (for those who copy-pasted the word above, click the End key in the keyboard) > 2. Press the space key in the keyboard > 3. Observe the cursor's location I'd suggest replacing typing an exclamation mark after the term "ניסיון", so the exclamation mark should be displayed at the end of the text, which is at the left side of the sentence in RTL. This issue can be simulated in HTML using the attached example, but chrome://browser/content/browser.xul doesn't seems to have similar code.
See Also: → 641238, 993806
Attached file HTML demo
I am attaching a more robust demo, in which the direction is controlled by its content (dir=auto/unicode-bidi:plaintext). ItielMaN said that Expected2 is his expected behavior, while I think that Expected1 is good enough…
Attachment #8817612 - Attachment is obsolete: true
(In reply to Tomer Cohen :tomer from comment #2) > Created attachment 8817617 [details] > HTML demo > > I am attaching a more robust demo, in which the direction is controlled by > its content (dir=auto/unicode-bidi:plaintext). ItielMaN said that Expected2 > is his expected behavior, while I think that Expected1 is good enough… Having the Expected1 will make no sense for 2 reasons: 1. If the screen is wide enough, right after the user will type any non-RTL character in the URL bar (while Firefox's language is RTL), the text will appear on the left, which will confuse the user as the translated into RTL language "Search or enter address" string appears on the right. 2. According to the new search suggestions design, both a page's title and it's URL appears on the right (which makes sense), and having non-RTL characters appear on the left will be inconsistent with the search suggestions design. And besides, all other major browsers behaves the same as Expected2 in this regard.
https://dxr.mozilla.org/mozilla-central/rev/5745bab28ff5e85128c774b56b4cc27c2afe2e1b/layout/style/res/forms.css#117-129 input.uri-element-right-align:-moz-locale-dir(rtl) { direction: ltr !important; text-align: right !important; }
Priority: -- → P3
Whiteboard: [fxsearch]
I think this should be fixed ASAP as the default text in the URL bar has LTR characters now (the search engine), which causes the entire translated sentence "Search with %S or enter address" in RTL locales to look reversed. See attached. I still think that expected2 in the HTML demo is the way to go here.
Attached image URL bar screenshot
The left part "ניתן לחפש עם" is the translation of "Search with" and should start from the right, where "או להקליד כתובת" is now.
This issue is not limited to Hebrew only, but also to other languages such as Farsi and Arabic.
[Tracking Requested - why for this release]: A (somewhat) recent change in the pre-filled text on the URL bar caused this bug to be more apparent on any New Tab (or when the URL bar is empty of user-typed text). The issue is that the text "Search with %S or enter address" is shown in reverse for all RTL locales, because the %S is the search engine name and is usually LTR text.
mak, it sounds like this bug has gotten worse or is now more apparent. Should this still be P3? Can you take another look?
Flags: needinfo?(mak77)
I honestly don't see a relation between comment 5 and this bug apart being both about RTL behavior in the address bar. This bug comment 0 starts with "Type any RTL characters in the URL bar", but if you type anything the placeholder text goes away, and comment 5 seems to be related to the placeholder text. As I see this, it should be filed as a new regression bug, blocking bug 1449317.
Flags: needinfo?(mak77)
un-tracking, we should track a proper regression bug.
Blocks: 1503161

Also fix the fade effect on RTL typed text.

Attachment #9110670 - Attachment description: Bug 1322542 - Display user-typed text in the urlbar according to its direction r?dao → Bug 1322542 - Display user-typed text in the urlbar according to its direction r?mak
Attachment #9110670 - Attachment description: Bug 1322542 - Display user-typed text in the urlbar according to its direction r?mak → Bug 1322542 - Display user-typed text in the urlbar according to its direction r?dao
Attachment #9110670 - Attachment description: Bug 1322542 - Display user-typed text in the urlbar according to its direction r?dao → Bug 1322542 - Display user-typed text in the urlbar according to its direction r?mak
Assignee: nobody → itiel_yn8
Flags: needinfo?(mak)
Pushed by ncsoregi@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d98ef30b82f7 Display user-typed text in the urlbar according to its direction r=mak https://hg.mozilla.org/integration/autoland/rev/3f46d4a4341c part 2 - fix textoverflow attribute. r=Itiel
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 73
Status: RESOLVED → VERIFIED
Regressions: CVE-2020-12408
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: