Closed Bug 1801693 Opened 3 years ago Closed 4 months ago

Persist search term RTL orientation doesn't match the websearch RTL orientation

Categories

(Firefox :: Address Bar, defect, P3)

Desktop
All
defect

Tracking

()

RESOLVED WONTFIX
Tracking Status
firefox108 --- affected
firefox109 --- affected

People

(Reporter: cbaica, Assigned: yazan)

References

(Blocks 3 open bugs)

Details

(Whiteboard: [sng-scotchbonnet-followon][scotchbonnet-persistsearchterms])

Attachments

(3 files)

Attached image google rtl bug

Found in

  • Fx 108.0b4

Affected versions

  • Fx 108.0b4
  • Fx 109.0a1

Affected platforms

  • Windows 10
  • Ubuntu 22.04
  • macOS

Preconditions

  • browser.urlbar.showSearchTerms.featureGate set to true.

Steps to reproduce

  1. Launch Firefox.
  2. In the address bar input: 11 22 33 and press enter.

Expected result

  • Orientation of the search in the address bar matches the orientation displayed in the websearch.

Actual result

  • Search term orientation doesn't match.

Regression range

  • Not a regression.

Additional notes

  • The issue occurs for Google and Bing. For both those engines, the websearch box has an RTL orientation.
  • The DDG websearch has 'normal orientation, so the search terms orientation currently match.

Here's how I tested on a Mac:

  1. Download a Hebrew version of Nightly
  2. Enable showSearchTerms.featureGate
  3. Switch my keyboard to Hebrew
  4. Type either a set of non-numeric Hebrew characters or Hebrew characters with a number
  5. Do a search

While using a mixture of text and numbers, I found the search term matches the ordering of characters in a search results page.

When the search consists entirely of numbers, the term in the urlbar won't match.

After some digging, it's because in SearchEngine, we call Services.textToSubURI.ConvertAndEscape(this.queryCharset, data). It does a conversion of the characters into a UTF-8 string. The difference is we encode a pure number string in the same order as they are input since there's nothing to suggest otherwise, whereas the the search engines encode the numbers in reverse.

Priority: -- → P3

Actually, I'm wrong that it only happens if it's just numbers. If we have a mixture of RTL and LTR characters, we'll see this same issue.

I think I understand the search partners reasoning for differences. Their search input box is RTL, so when you type a string "123 456", it'll appear in the input box as "456 123". Making a search will encode the search term as "123+456".

In contrast, the urlbar input won't apply any re-ordering until the user types an RTL character.

Has STR: --- → yes
Attached image google screenshot

I am not sure if this got fixed for google or it still displays the text in the wrong order, but comparing to the initial screenshot, it looks better.
I am leaving the bug open as the issue still occurs for bing.

Hmm, I didn't do anything to address this bug, possibly a by-product of some modification to the Urlbar w.r.t. RTL?

Whiteboard: [sng-scotchbonnet]

Is this no longer reproducible?

Flags: needinfo?(cbaica)

Hey Chris,
Yes, this is still reproducible, with the same steps mentioned in comment 0.

Flags: needinfo?(cbaica)
Blocks: 1939598
Whiteboard: [sng-scotchbonnet] → [sng-scotchbonnet-followon][scotchbonnet-persistsearchterms]
Assignee: nobody → yalmacki
Status: NEW → ASSIGNED

I'm going to take module owner's prerogative here and say that this is not a bug, or an enhancement, or something we should fix. There's discussion in the phabricator, but in summary, Firefox's UI should not be dictated by the UI of web pages it happens to load, and it certainly shouldn't change depending on the current tab.

If Product or UX wants to make this change, OK, we can discuss it further, but for now I'll close this.

Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: