Closed Bug 1745435 Opened 3 years ago Closed 3 years ago

Unable to select the last image at the very end of a line with single-click & drag

Categories

(Core :: DOM: Selection, defect, P2)

69 Branch
defect

Tracking

()

RESOLVED FIXED
97 Branch
Tracking Status
firefox-esr91 --- wontfix
firefox95 --- wontfix
firefox96 --- wontfix
firefox97 --- fixed

People

(Reporter: Fanolian+BMO, Assigned: TYLin)

References

(Regression)

Details

(4 keywords)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0
Build ID: 20211209155024

Steps to reproduce

  1. Open the attached test case.
  2. Single click on the first line and drag to the end of the line.

Expected result

The image at the end (🎊) is selected.
It is selected in Chrome and Edge.

Actual result

The image is not selected.

The image can be selected, however, If I:

  1. single-click and drag to the next paragraph;
  2. double/triple-click and drag to the end of the same line; or
  3. add any character after the image in the same line.

Regression

Last good Nightly: 2019-06-17
First bad Nightly: 2019-06-18
pushlog: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=40c99f4752f968db32f189243b4432b18d1b3471&tochange=0dff9f803849e1e95d097fb2a41167f56c2d22c7

I am unable to further bisect it with Mozregression. This bug is probably regressed by bug 1550869.

Flags: needinfo?(aethanyc)

Preemptively marking Firefox 95/96 as WONTFIX since this is an old regression. I don't have the permission to change the status for esr-91 though.

Has Regression Range: --- → yes
Has STR: --- → yes
Regressed by: 1550869

Bug 1550869 was to fix the issue with single-clicking. This bug is about single-clicking & drag. Actually I can also reproduce it in the test case for bug 1550869.

I filed this bug because I can select other images on the same line with single-click & drag, just not the last one. Also Firefox acts differently to other browsers.

Summary: Unable to select the last image of a line with single-click & drag → Unable to select the last image at the very end of a line with single-click & drag

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

Thanks for the report and the testcase. Indeed, after Bug 1550869, the image at the end of line is harder to select. I can take a look.

Status: UNCONFIRMED → NEW
Ever confirmed: true

Bug 1550869 made all the non-editable images return a FrameTarget with
userFrameEdge=true. When the user moves the mouse pointer to select an image
from its left edge, the mouse pointer needs to reach the right edge of the image
in order to complete the selection. This makes it difficult to select an image
at the end of a line.

This patch restores the behavior to select a non-draggable & non-editable image
to it was before bug 1550869. That is, we recognize the image selection when the
mouse pointer moves passed the middle point of the image
width (OffsetsForSingleFrame). Both blink and webkit have the same behavior,
but no spec text dictates this behavior, so I mark the wpt test as "tentative".

Assignee: nobody → aethanyc
Status: NEW → ASSIGNED
Flags: needinfo?(aethanyc)

(In reply to Ting-Yu Lin [:TYLin] (UTC-8) from comment #5)

Created attachment 9255599 [details]
Bug 1745435 - Make non-draggable & non-editable images easier to select.

In testing/web-platform/tests/selection/select-end-of-line-image.tentative.html, line 7:

<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1743074">

Should it be show_bug.cgi?id=1745435 instead? Sorry I don't have the permission to leave a comment in Phabricator.

Flags: needinfo?(aethanyc)

Yes, it should. Thanks for noticing that! I copied the test from bug 1745435, but forgot to update the bug number.

Flags: needinfo?(aethanyc)
Severity: -- → S3
Priority: -- → P2
Pushed by aethanyc@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/e6f994394be4
Make non-draggable & non-editable images easier to select. r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/32121 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
Upstream PR merged by moz-wptsync-bot
Regressions: 1754459
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: