Closed Bug 1897371 Opened 1 year ago Closed 1 year ago

[Windows] Text selection cleared when screenshot is taken

Categories

(Firefox :: Screenshots, defect)

Firefox 128
Desktop
Windows
defect

Tracking

()

VERIFIED FIXED
128 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox126 --- unaffected
firefox127 --- unaffected
firefox128 --- verified

People

(Reporter: oardelean, Assigned: niklas)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Notes

Found in

  • Firefox Nightly 128.0a1;

Affected versions

  • Firefox Nightly 128.0a1;

Tested platforms

  • macOS 12;
  • Windows 10;
  • Ubuntu 22;

Affected platforms

  • Windows 10;

Unaffected platforms

  • macOS 12;
  • Ubuntu 22;

Steps to reproduce

  1. Launch Firefox.
  2. Go to Hamburger Menu -> More Tools -> Customize toolbar.. and add the Screenshot button in the toolbar.
  3. Go to any random website, eg. www.wikipedia.com
  4. Select some text from the page.
  5. Take a screenshot of the highlighted section.

Expected result

  • Text selection remains highlighted.

Actual result

  • Text selection loses highlight.

Regression range

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

:niklas, since you are the author of the regressor, bug 1789727, could you take a look?

For more information, please visit BugBot documentation.

Flags: needinfo?(nbaumgardner)

Are you able to reproduce this on Windows 11?
I'm using Windows 11 and I'm not able to reproduce.

Could you share a video of the STR?

Flags: needinfo?(nbaumgardner) → needinfo?(oardelean)

I can reproduce the issue on Nightly128.0a1 Windows11.

Steps to reproduce:

  1. Open web page e.g. https://en.wikipedia.org/wiki/Main_Page
  2. Select some text
  3. Right click on content area and choose Take Screenshot
  4. Try to select region to take screenshot by mouse dragging
    ---- Text selection is corrupted at the dragend. Bug!
Attached image selection bug.gif

STR used:

  1. Launch Firefox.
  2. Go to any random website, eg. www.wikipedia.com
  3. Select some text from the page.
  4. Right-click on the page to open context menu and choose 'Take Screenshot' option.
  5. Try to take a screenshot of the highlighted section.

Issue is also reproducible if using the Screenshot tool.
Windows 11, Version 23H2(OS build 22631.3447).
Please note that this issue is reproducible only on Firefox Nightly 128.0a1.

Flags: needinfo?(oardelean)
Assignee: nobody → nbaumgardner
Status: NEW → ASSIGNED
Pushed by nbaumgardner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9c9ff83d58cc Handle selectionchange events in screenshots overlay.r=kcochrane
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch

The patch landed in nightly and beta is affected.
:niklas, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox127 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(nbaumgardner)
Flags: needinfo?(nbaumgardner)
Regressed by: 1890721
No longer regressed by: 1789727

Comment on attachment 9402486 [details]
Bug 1897371 - Handle selectionchange events in screenshots overlay.r=sfoster,kcochrane

Beta/Release Uplift Approval Request

  • User impact if declined: Users won't be able to screenshot a selected text region in screenshots component release
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: STR:
  1. Go to any page with text https://en.wikipedia.org/wiki/Firefox
  2. select some text on the page
  3. open screenshots
  4. select a region on the page that includes the selected text
  5. copy or download the screenshot

ER:
the image should have selected text

  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This was already in 127 but was accidentally regressed in bug 1890721
  • String changes made/needed: No
  • Is Android affected?: No
Attachment #9402486 - Flags: approval-mozilla-beta?
Flags: qe-verify+

Niklas, if this was regressed in bug 1890721 (v128), then the regression can't be on the beta branch (v127). Are you sure we have the bug in beta? I tried to reproduce it but it works for me on beta 7.

Flags: needinfo?(nbaumgardner)
QA Whiteboard: [qa-triaged]

I have reproduced the issue using Nightly 128.0a1 (20240527092611) and verified the fix using Nightly 128.0a1 (20240529013712) on Windows 10,
MacOS 14.04 and Ubuntu 24.04.

Also, as Pascal mentioned in Comment 11, I cannot reproduce the issue on Beta 127.0b7 either.

Attachment #9402486 - Flags: approval-mozilla-beta? → approval-mozilla-beta-

(In reply to Pascal Chevrel:pascalc from comment #11)

Niklas, if this was regressed in bug 1890721 (v128), then the regression can't be on the beta branch (v127). Are you sure we have the bug in beta? I tried to reproduce it but it works for me on beta 7.

My apologies. I thought I had uplifted bug 1890721 but I must've been looking at the wrong bug.

Thanks for catching my mistake! Sorry about the confusion.

Flags: needinfo?(nbaumgardner)
See Also: → 1902303
Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triaged]
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: