Closed Bug 1883765 Opened 4 months ago Closed 4 months ago

[RTL] Screenshot UI is displayed as LTR

Categories

(Firefox :: Screenshots, defect, P1)

defect

Tracking

()

VERIFIED FIXED
126 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox123 --- unaffected
firefox124 --- unaffected
firefox125 --- disabled
firefox126 --- verified

People

(Reporter: itiel_yn8, Assigned: niklas, NeedInfo)

References

(Regression)

Details

(Keywords: regression, rtl)

Attachments

(4 files, 1 obsolete file)

Attached image Screenshot

See attached, the senctence is in reverse (the dot in the wrong spot, and the ESC makes the text to appear in the wrong order).
This is being forced to LTR by this:
https://searchfox.org/mozilla-central/rev/6b0b8c1003504e302e243c300355ef4d61e24909/layout/style/res/ua.css#454

Attached image Screenshot 2

Also the buttons appear from left to right (the icon should appear on the right)

Summary: [RTL] Screenshot UI is dislayed as LTR → [RTL] Screenshot UI is displayed as LTR
Assignee: nobody → nbaumgardner
Status: NEW → ASSIGNED

Set release status flags based on info from the regressing bug 1789727

:nikla just a reminder that 125 goes to beta next week.
The patch is pending some revisions, if this can be updated and landed in central this week?

Flags: needinfo?(nbaumgardner)

Set release status flags based on info from the regressing bug 1789727

Severity: -- → S3
Priority: -- → P1

(In reply to Donal Meehan [:dmeehan] from comment #4)

:nikla just a reminder that 125 goes to beta next week.
The patch is pending some revisions, if this can be updated and landed in central this week?

This whole feature is behind a pref that is only default on in Nightly. However, it wouldn't hurt to uplift a fix for beta and release users that have manually flipped the pref.

Flags: needinfo?(nbaumgardner)

(In reply to Itiel from comment #0)

This is being forced to LTR by this:
https://searchfox.org/mozilla-central/rev/6b0b8c1003504e302e243c300355ef4d61e24909/layout/style/res/ua.css#454

I think I would expect this overlay UI's direction to follow that of the browser chrome, not whatever document the anonymous content is hosted in. It would be weird to have it LTR on one page, and RTL on another. Does that sound right :Itiel?

In that case I guess we need to pass the direction down from the parent and explicitly set the direction property from JS when we create the overlay.

Flags: needinfo?(itiel_yn8)

(In reply to Sam Foster [:sfoster] (he/him) from comment #7)

(In reply to Itiel from comment #0)

This is being forced to LTR by this:
https://searchfox.org/mozilla-central/rev/6b0b8c1003504e302e243c300355ef4d61e24909/layout/style/res/ua.css#454

I think I would expect this overlay UI's direction to follow that of the browser chrome, not whatever document the anonymous content is hosted in. It would be weird to have it LTR on one page, and RTL on another. Does that sound right :Itiel?

Correct.

Flags: needinfo?(itiel_yn8)
Attachment #9389519 - Attachment is obsolete: true
See Also: → 1886843
Pushed by nbaumgardner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d4fa0d22768b
Screenshots direction should match browser direction. r=sfoster,Itiel
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 126 Branch

I can confirm that in the latest Nightly 126.0a1, the dot is now in the right position when making a mouse/click selection and the button's icon appears on the right side.

However, I've noticed a couple of things that I'm not sure are intended or not:

  1. The buttons are still displayed on the left side of the screen selection and not on the right.
  2. The "x" from the pixels counter is no longer in the middle as it is in Comment 1 (please see the screenshot).

Niklas, are these behaviors intended?

Flags: needinfo?(nbaumgardner)

(In reply to Simona Badau, Desktop QA from comment #12)

Created attachment 9395554 [details]
Screenshot on Nightly 126

I can confirm that in the latest Nightly 126.0a1, the dot is now in the right position when making a mouse/click selection and the button's icon appears on the right side.

However, I've noticed a couple of things that I'm not sure are intended or not:

  1. The buttons are still displayed on the left side of the screen selection and not on the right.
  2. The "x" from the pixels counter is no longer in the middle as it is in Comment 1 (please see the screenshot).

Niklas, are these behaviors intended?

You're absolutely correct about #2, can you file a bug on this and needinfo me? Should be an easy fix, just force LTR for the text span.
I think you're right also about #1, the code for this should be somewhere around https://searchfox.org/mozilla-central/rev/294e1fbdcc9ca0c328c372392e03bb49df4ee77e/browser/components/screenshots/ScreenshotsOverlayChild.sys.mjs#1449,1452

Niklas, does that sound about right? ^

Regressions: 1891247

Verified as fixed using the latest Nightly 127.0a1 and Firefox 126.0b5 (having 'screenshots.browser.component.enabled' set to 'true') on macOS 13, Ubuntu 22.04 and Windows 10.x64 - the issues mentioned in the Description and Comment 1 are no longer reproducible.

Also, I logged Bug 1893460 to cover the left issue from Comment 12.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: