user-select: none on html suppress selection even if redefined locally with user-select:text
Categories
(Core :: Layout, defect)
Tracking
()
People
(Reporter: karlcow, Assigned: TYLin)
References
()
Details
Attachments
(3 files)
Steps to reproduce:
1.Type this in Firefox Android data:text/html,<!doctype html><html style="user-select:none;"><p style="font-size:4em;user-select:text;">try to select me with longpress</p></html>
2. Do a longpress to select the text
Expected:
Text is selected
Actual:
Nothing
Note:
Working on Chrome Canary.
Initially found on quora.com website.
Updated•3 years ago
|
Comment 1•3 years ago
|
||
Regular text selection works fine so this is less of a CSS issue and more of a layout / caret one... Ting-yu, do you know where long-press is handled? AccessibleCaret I presume?
| Assignee | ||
Comment 3•3 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #1)
Regular text selection works fine so this is less of a CSS issue and more of a layout / caret one... Ting-yu, do you know where long-press is handled? AccessibleCaret I presume?
Yes, the events including long-press are intercepted by AccessibleCaret in PresShell::MaybeHandleEventWithAccessibleCaret [1]. If the the event is a long-press, we will select a word here [2].
[1] https://searchfox.org/mozilla-central/rev/70b32246fce5ca1f53af573a21c1939df58cb969/layout/base/PresShell.cpp#7414-7419
[2] https://searchfox.org/mozilla-central/rev/70b32246fce5ca1f53af573a21c1939df58cb969/layout/base/AccessibleCaretManager.cpp#926-944
| Assignee | ||
Comment 4•3 years ago
|
||
Karl, could you double check the testcase? On Android, I can long-press and select the text just fine on either the word "select" or "longpress" in the sentence "try to select me with longpress".
| Reporter | ||
Comment 5•3 years ago
|
||
The test case is indeed working now. Weird.
But this is still failing on https://www.quora.com/search?q=my%20duck%20has%20been%20sitting%20on%20some%20eggs
Hmmm back to the drawing board.
I'll dig again into it.
| Assignee | ||
Comment 6•3 years ago
|
||
OK. I got a reduced testcase. I think this is a glitch when resolving the used value of user-select because for a inline parent with user-select: text , its inline child is selectable, but its block child is not.
| Assignee | ||
Comment 7•3 years ago
|
||
This bug can also be reproduce on desktop. I'll take a look.
| Assignee | ||
Comment 8•3 years ago
|
||
user-select is a non-inheriting property. Add user-select: inherit to the UA
so that the -moz-block-inside-inline-wrapper blocks has the same style as their
inline siblings.
Comment 11•3 years ago
|
||
Backed out for causing wpt failures in /css/css-ui/user-select-001.html
Backout link: https://hg.mozilla.org/integration/autoland/rev/502a7657b94eb75969c9ad522b31609244ad9b8d
INFO - TEST-START | /css/css-ui/user-select-001.html
[task 2021-12-03T02:05:13.751Z] 02:05:13 INFO - Closing window 200946c3-db56-408c-99a0-8cd88d81be8d
[task 2021-12-03T02:05:54.133Z] 02:05:54 INFO - TEST-UNEXPECTED-TIMEOUT | /css/css-ui/user-select-001.html | expected OK
[task 2021-12-03T02:05:54.133Z] 02:05:54 INFO - TEST-INFO took 40392ms
[task 2021-12-03T02:05:54.461Z] 02:05:54 INFO - STDOUT: cleanup aborted: Unable to remount device
[task 2021-12-03T02:05:54.561Z] 02:05:54 INFO - STDOUT: cleanup aborted: Unable to remount device
[task 2021-12-03T02:05:54.563Z] 02:05:54 INFO - Closing logging queue
[task 2021-12-03T02:05:54.564Z] 02:05:54 INFO - queue closed
[task 2021-12-03T02:05:54.585Z] 02:05:54 INFO - Setting up ssl
[task 2021-12-03T02:05:54.600Z] 02:05:54 INFO - certutil | b''
[task 2021-12-03T02:05:54.617Z] 02:05:54 INFO - certutil | b''
[task 2021-12-03T02:05:54.635Z] 02:05:54 INFO - certutil | b'\nCertificate Nickname Trust Attributes\n SSL,S/MIME,JAR/XPI\n\nweb-platform-tests CT,, \n'
[task 2021-12-03T02:05:55.383Z] 02:05:55 INFO - adb Granting important runtime permissions to org.mozilla.geckoview.test_runner
[task 2021-12-03T02:05:56.684Z] 02:05:56 INFO - adb launch_application: am start -W -n org.mozilla.geckoview.test_runner/org.mozilla.geckoview.test_runner.TestRunnerActivity -a android.intent.action.MAIN --es env0 MOZ_CRASHREPORTER=1 --es env1 MOZ_CRASHREPORTER_NO_REPORT=1 --es env2 MOZ_CRASHREPORTER_SHUTDOWN=1 --es env3 MOZ_HIDE_RESULTS_TABLE=1 --es env4 MOZ_IN_AUTOMATION=1 --es env5 MOZ_LOG=signaling:3,mtransport:4,DataChannel:4,jsep:4 --es env6 R_LOG_LEVEL=6 --es env7 R_LOG_DESTINATION=stderr --es env8 R_LOG_VERBOSE=1 --es env9 MOZ_PROCESS_LOG=/tmp/tmp88n5yyv9pidlog --es env10 MOZ_DISABLE_NONLOCAL_CONNECTIONS=1 --es env11 STYLO_THREADS=1 --es env12 MOZ_WEBRENDER=1 --es arg0 -no-remote --es arg1 -profile --es arg2 /data/local/tmp/test_root/profile --es arg3 --marionette --es arg4 about:blank --ez use_multiprocess True
[task 2021-12-03T02:05:57.638Z] 02:05:57 INFO - Starting runner
[task 2021-12-03T02:05:58.280Z] 02:05:58 INFO - TEST-START | /css/css-ui/webkit-appearance-parsing.html
| Assignee | ||
Updated•3 years ago
|
Comment 13•3 years ago
|
||
Comment 14•3 years ago
|
||
| bugherder | ||
Updated•3 years ago
|
Description
•