Selecting text on <travador.com> no longer works
Categories
(Core :: DOM: Selection, defect, P2)
Tracking
()
People
(Reporter: soeren.hentzschel, Assigned: saschanaz)
References
(Regression, )
Details
(Keywords: regression)
Attachments
(2 files)
633 bytes,
text/html
|
Details | |
48 bytes,
text/x-phabricator-request
|
pascalc
:
approval-mozilla-beta+
RyanVM
:
approval-mozilla-release-
|
Details | Review |
[Tracking Requested - why for this release]:
Selecting text on the website scm-shop.de no longer works. This is a regression of Firefox 88. According to mozregression the regressing bug is bug 1674658.
STR:
- open https://www.scm-shop.de/buecher/romane-erzaehlungen/historische-romane/buchset-die-meindorff-triologie.html
- try to select text
Expected:
You can select the text.
Actual:
You can only select a few characters.
There are no problems in Google Chrome and Apple Safari.
Comment 1•3 years ago
|
||
Marking it as fix-optional for 89 as it is too late to fix for GA but I would evaluate a safe uplift in a dot release if we have one.
Updated•3 years ago
|
Since selecting a few characters (four, on my machine) works, the mechanism isn't completely broken. It's unclear whether this a bug on the website, or within Gecko. I wonder if there are mechanisms other than preventDefault
which are relevant here, which are different in Gecko than in the other browsers.
@krosylight,masayuki: any idea?
Assignee | ||
Comment 3•3 years ago
|
||
This sounds similar to what I saw in bug 1707925, where the testcase also allowed a short selection using .pageX/Y
. It seems the website uses different code, though.
Assignee | ||
Comment 4•3 years ago
•
|
||
Oh, it seems both uses jQuery Mobile swipe event (although not sure which version).
I tried doing MouseEvent.prototype.preventDefault = () => console.error(new Error)
on Chrome and it seems the page does calls it there, but somehow it does not prevent the selection. 🤔
Selection not working:
Click-and-drag horizontally
Working:
Click-and-drag vertically
Double-click
Triple-click
Reporter | ||
Comment 6•3 years ago
|
||
The same happens on Travador (for example on https://www.travador.com/kategorie/oesterreich), one of the most popular travel platforms in Germany/Austria.
Assignee | ||
Comment 7•3 years ago
|
||
This is a minimal repro, and I think it's a Chrome bug. Setting transform: translateX(9px)
somewhere in the tree blocks ev.preventDefault()
behavior and thus lets the selection change continue. The value 9px
matters here, any smaller values are not problematic but larger values are.
Kagami: thanks for the analysis. Filed a bug for Chromium.
Reporter | ||
Comment 9•3 years ago
|
||
[Tracking Requested - why for this release]:
Requesting tracking for Firefox 90 based on comment 6 (a very popular website is affected, at least in the region where I live).
Regarding comment 7: I don't know if there is a bug in Chrome but it works in every other browser and it also worked in Firefox until Firefox 88 so it's obvious that the current behaviour of Firefox 89+ is not the behaviour that was intended by the website's developers. So we need either a fix in Firefox for webcompat reasons or someone has to reach out to the developers of all affected websites if they have to do something differently.
By the way, I cannot see the usage of transform at all on the linked Travador page. Where does it come from in the reduced test case?
Assignee | ||
Comment 10•3 years ago
|
||
You can search in DevTools by "transform: translateX" and it's there in one of navbar__dropdown
.
IMO fixing it would be an interesting story, because fixing the bug from Chrome will break the affected websites (or any websites with jQuery Mobile and CSS transform). I still think mousemove shouldn't prevent selection change, and maybe we should let Chrome fix their behavior...
Comment 11•3 years ago
|
||
Kagami, do you think you had some time for this after the wellness week? Like thinking if there was some sane way to unbreak the websites?
If not, assign this to me :)
Assignee | ||
Comment 12•3 years ago
|
||
I will be off two weeks after the wellness week, so, sorry this is yours 😆
Updated•3 years ago
|
Comment 13•3 years ago
|
||
I can't reproduce this on https://www.scm-shop.de/buecher/romane-erzaehlungen/historische-romane/buchset-die-meindorff-triologie.html
but can on https://www.travador.com/kategorie/oesterreich
Unfortunately the behavior on Chrome is totally nuts with the transform handling.
Reporter | ||
Comment 14•3 years ago
•
|
||
I can't reproduce this on https://www.scm-shop.de/buecher/romane-erzaehlungen/historische-romane/buchset-die-meindorff-triologie.html
I can also no longer reproduce the issue on this website. Maybe they changed something on their end? I changed the bug title to reflect the current situation.
Comment 15•3 years ago
|
||
(In reply to Kagami :saschanaz [off 28 June - 16 July] from comment #12)
I will be off two weeks after the wellness week, so, sorry this is yours 😆
As you are back and Olly left, can you take it? :)
Assignee | ||
Comment 16•3 years ago
•
|
||
Oh, thanks for the ping.
Like thinking if there was some sane way to unbreak the websites?
Since fixing the Chrome side issue (comment #7, comment #8) will also break those websites on it, my current guess is that the workaround would be a site intervention to make MouseEvent#preventDefalut as no-op.
Assignee | ||
Comment 17•3 years ago
•
|
||
(But before that we'll need to file a bug for the problematic library, which probably is jQuery Mobile here.)
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 18•3 years ago
•
|
||
Okay I have the patch for that library, but I doubt anyone will adopt it since the project seems very inactive and the last release was over 6 years ago.
At this state I think we should revert the preventDefault patch, what do you think? (Mirko will not be there for a while so I'm a bit hesitant.)
Updated•3 years ago
|
Comment 19•3 years ago
|
||
(In reply to Kagami :saschanaz from comment #18)
Okay I have the patch for that library, but I doubt anyone will adopt it since the project seems very inactive and the last release was over 6 years ago.
Yes, it seems jquery-mobile is pretty unmaintained at least since 2017, see https://blog.jquerymobile.com/2017/05/11/jquery-mobile-1-5-0-alpha-1-released/. This raises the question if we should take care of websites that still use it, apparently.
At this state I think we should revert the preventDefault patch, what do you think? (Mirko will not be there for a while so I'm a bit hesitant.)
IIUC, the patch of bug 1674658 intended to increase the compatibility with other browsers, even if it violates the spec. The spec issue there seems still open and also Google did not try to fix their related bug. I am slightly confused what would be the state of compatibility if we just reverted that patch.
Comment 20•3 years ago
|
||
Given
- The discussion kagami has had in https://github.com/w3c/uievents/issues/278 that suggests Chrome might want to align with our previous behavior (of not allowing
preventDefault()
). - Fixing bug 1674658 wasn't motivated by a particular website.
- Chrome's behavior around
preventDefault()
apparently depends on layout in complicated (indeed, likely buggy) ways.
I agree that we should revert our patch and once more encourage Chrome and Safari to follow us in the issue mentioned above.
Comment 21•3 years ago
|
||
Hi Kagami, can you take care of this, please? Thank you!
Assignee | ||
Comment 22•3 years ago
|
||
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Comment 23•3 years ago
|
||
Pushed by krosylight@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a290e6bee125 Remove mouse event default action and revert bug 1674658 r=annevk
Comment 24•3 years ago
|
||
bugherder |
Comment 25•3 years ago
|
||
Is that something we want to uplift to 91 beta?
Assignee | ||
Comment 26•3 years ago
|
||
Comment on attachment 9233124 [details]
Bug 1712339 - Remove mouse event default action and revert bug 1674658 r=annevk,jdai,jstutte
Beta/Release Uplift Approval Request
- User impact if declined: Users won't be able to select text by mouse on websites with jquery-mobile.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): This only restores pre-88 behavior.
- String changes made/needed:
Assignee | ||
Updated•3 years ago
|
Comment 29•3 years ago
|
||
Comment on attachment 9233124 [details]
Bug 1712339 - Remove mouse event default action and revert bug 1674658 r=annevk,jdai,jstutte
Approved for 91 beta given the number of dupes, thanks.
Comment 30•3 years ago
|
||
bugherder uplift |
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Comment 31•3 years ago
|
||
I managed to reproduce the issue using an older bersion of Nightly. I retested everything using Firefox 91.0n8 and Nightly 92.0a1 on macOS 10.15, Windows 10 x64 and Ubuntu 18.04 x64. The issue is not reproducing anymore.
Updated•3 years ago
|
Updated•3 years ago
|
Description
•