Images get highlighed when clicked
Categories
(Core :: DOM: Selection, defect, P2)
Tracking
()
People
(Reporter: vqrhxw35a, Assigned: emilio)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files)
199 bytes,
text/html
|
Details | |
48 bytes,
text/x-phabricator-request
|
dmeehan
:
approval-mozilla-beta+
|
Details | Review |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0
Steps to reproduce:
Open https://www.peopleinside.it/
Click on images they will selected.
See: https://github.com/webcompat/web-bugs/issues/99347
Actual results:
Images are showed selected
Expected results:
Image should be not showed selected
Comment 1•2 years ago
|
||
Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=71d18b1a1fc12b44eac1fba2afa0a28ba5231ad3&tochange=e6f994394be4fd1eb00bd8db40e8a8dcb42f5f9a
Comment 2•2 years ago
|
||
The patch that regresses this says
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
).
and based on that, I don't think that just clicking an image should be triggering this.
Ting-Yu, could you please look at this case and see what we can do about this? :)
Comment 3•2 years ago
|
||
[Tracking Requested - why for this release]:
This is a regression in 97, where just clicking an image select-highlights the entire image. This isn't breaking anything, but probably can be considered a minor visual annoyance. Requesting tracking just so this is on your radar.
Comment 4•2 years ago
|
||
The images has pointer-events: none
that seems to trigger this annoyance. After changing it to default pointer-events: auto
, it behaves as expected. I haven't looked into how that can trigger the selection for the image. (keeping the NI as a reminder.)
Thank you!
For avoid this bad Firefox visual in my website I will add the following CSS:
user-select: none;
You should still be able to deactivate this in the browser console and still continue to diagnose and fix this visual issue on Firefox.
For anything I will be here, following this issue until the end.
If you never see "the bug" is because I added
user-select: none;
as temporary fix.
Comment 6•2 years ago
|
||
Unlikely we'll do anything to address this out-of-band in Fx97 at this point unless we get more reports of this being more widespread, but let's keep it on the radar for 98 at least.
Updated•2 years ago
|
Comment hidden (advocacy) |
Updated•2 years ago
|
Comment 8•2 years ago
|
||
Hi Frank!
This issue has been tracked for Fx 98 and Fx99. However, Ting-Yu is away for two months. Can we have someone else on your team to take this instead? Thank you!
Comment 9•2 years ago
|
||
I've spoken to Ting Yu about this. He's going to look into it through today and I'll ask Emilio if he can pick it up.
Comment 10•2 years ago
•
|
||
I think this is an old bug because I can reproduce this on Nightly 2016-01-01. My patch in Bug 1550869 (landed in 2019-06-18) might hide it, and Bug 1745435 reveals it again.
Comment 11•2 years ago
|
||
The testcase is simple: an image with pointer-events: none
.
Assignee | ||
Comment 12•2 years ago
|
||
What saves us in the non-pointer-events: none case is silly, and is
this loop that hits the draggable image:
Needs tests (if it doesn't affect existing ones), but uploading for some
initial feedback. I think this makes a lot more sense than the existing
code, and works for editing and dragging the same way, so it's nice to
have less special-cases.
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Comment 13•2 years ago
|
||
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/57845918277d Improve caret position selection for images. r=dholbert
Comment 14•2 years ago
|
||
bugherder |
Comment 15•2 years ago
|
||
:emilio looks like a good candidate for a beta uplift request for 99?
Assignee | ||
Comment 16•2 years ago
|
||
Comment on attachment 9268085 [details]
Bug 1754459 - Improve caret position selection for images. r=TYLin,jfkthame
Beta/Release Uplift Approval Request
- User impact if declined: comment 0
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: comment 0. Also please re-test that bug 1550869 and bug 1745435 did not regress. I checked manually and we have tests for that but worth sanity-checking if we're going to uplift.
- List of other uplifts needed: Bug 1759866
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Relatively simple change. This code is a bit gnarly though it's pretty self-contained so I'm mildly confident it won't cause regressions. Behavior also matches other browsers which is good.
- String changes made/needed: none
Assignee | ||
Updated•2 years ago
|
Comment 17•2 years ago
•
|
||
Comment on attachment 9268085 [details]
Bug 1754459 - Improve caret position selection for images. r=TYLin,jfkthame
Approved for 99.0b7. Thanks.
Updated•2 years ago
|
Comment 18•2 years ago
|
||
bugherder uplift |
Comment 19•2 years ago
•
|
||
Reproduced the initial issue on Firefox 99 beta 6 on Windows 10 x64.
Verified as fixed on the latest Nightly 100.0a1 on Windows 10 x 66 - the images are no longer highlighted on a single click.
Re-tested also that Bug 1550869 and Bug 1745435 did not regress on the latest Nightly 100.0a1.
Reporter | ||
Comment 20•2 years ago
|
||
Yes seems on Nightly 100.0a1 the issue is resolved.
Thanks.
Comment 21•2 years ago
|
||
Verified as fixed on Firefox 99.0b7 on macOS Big Sur 11.6, Windows 10 x64, and Ubuntu 20.04 x64.
Comment 22•2 years ago
|
||
Thanks for getting this across the line, emilio!
Description
•