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)
Firefox
Address Bar
Tracking
()
VERIFIED
FIXED
Firefox 73
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.
Comment 1•8 years ago
|
||
(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.
Updated•8 years ago
|
Comment 2•8 years ago
|
||
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.
Comment 4•8 years ago
|
||
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;
}
Updated•8 years ago
|
Priority: -- → P3
Whiteboard: [fxsearch]
status-firefox57:
--- → wontfix
status-firefox58:
--- → affected
status-firefox57:
wontfix → ---
status-firefox58:
affected → ---
status-firefox62:
--- → affected
status-firefox63:
--- → affected
status-firefox61:
--- → fix-optional
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.
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.
tracking-firefox62:
--- → ?
Comment 9•6 years ago
|
||
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)
Comment 10•6 years ago
|
||
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)
Comment 11•6 years ago
|
||
un-tracking, we should track a proper regression bug.
tracking-firefox62:
+ → ---
Assignee | ||
Comment 12•5 years ago
|
||
Also fix the fade effect on RTL typed text.
Updated•5 years ago
|
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
Updated•5 years ago
|
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
Updated•5 years ago
|
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
Comment 13•5 years ago
|
||
Backed out changeset f69b1ca45a44 (bug 1322542) for bc failures in browser_UrlbarInput_overflow.js
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=280685452&repo=autoland&lineNumber=2290
Backout: https://hg.mozilla.org/integration/autoland/rev/d5c058da8148283fb78efa6f73dd7af916b883ac
Flags: needinfo?(mak)
Updated•5 years ago
|
Assignee: nobody → itiel_yn8
Comment hidden (obsolete) |
Comment 15•5 years ago
|
||
Depends on D54195
Updated•5 years ago
|
Flags: needinfo?(mak)
Comment 16•5 years ago
|
||
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
Comment 17•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d98ef30b82f7
https://hg.mozilla.org/mozilla-central/rev/3f46d4a4341c
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox73:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 73
Status: RESOLVED → VERIFIED
Updated•5 years ago
|
Updated•5 years ago
|
Regressions: CVE-2020-12408
You need to log in
before you can comment on or make changes to this bug.
Description
•