WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED CONFIGURATION CHANGED
Bug 87343
selectstart event won't be fired in Shadow DOM when SelectAll is executed.
https://bugs.webkit.org/show_bug.cgi?id=87343
Summary
selectstart event won't be fired in Shadow DOM when SelectAll is executed.
Shinya Kawanaka
Reported
2012-05-23 23:14:33 PDT
When a node is in Shadow DOM, document.execCommand('SelectAll') won't fire selectstart to the node in Shadow DOM.
Attachments
Patch
(6.84 KB, patch)
2013-01-09 23:15 PST
,
Shinya Kawanaka
no flags
Details
Formatted Diff
Diff
Patch
(7.11 KB, patch)
2013-01-10 20:37 PST
,
Shinya Kawanaka
rniwa
: review+
commit-queue
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Shinya Kawanaka
Comment 1
2012-05-24 00:22:40 PDT
This might be hard to fix... because of
Bug 52195
.
Shinya Kawanaka
Comment 2
2013-01-09 22:26:32 PST
***
Bug 106528
has been marked as a duplicate of this bug. ***
Shinya Kawanaka
Comment 3
2013-01-09 22:27:43 PST
When containing ShadowRoot is UserAgentShadowRoot, we should fire selectstart on host element. Otherwise, we should fire selectstart from the target element, I think.
Shinya Kawanaka
Comment 4
2013-01-09 23:15:08 PST
Created
attachment 182072
[details]
Patch
Dimitri Glazkov (Google)
Comment 5
2013-01-10 09:40:04 PST
Comment on
attachment 182072
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=182072&action=review
Can you explain the reasoning here a bit more? It seems that we shouldn't have such distinctions between UA and author shadow roots.
> LayoutTests/fast/dom/shadow/selectstart-expected.txt:1 > +selectstart should be fired in a user selects elements in ShadowDOM, but it should not be propageted to host element. When selecting text in an input element, selectstart should be fired on the input element.
propagated.
Shinya Kawanaka
Comment 6
2013-01-10 18:45:12 PST
(In reply to
comment #5
)
> (From update of
attachment 182072
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=182072&action=review
> > Can you explain the reasoning here a bit more? It seems that we shouldn't have such distinctions between UA and author shadow roots. > > > LayoutTests/fast/dom/shadow/selectstart-expected.txt:1 > > +selectstart should be fired in a user selects elements in ShadowDOM, but it should not be propageted to host element. When selecting text in an input element, selectstart should be fired on the input element. > > propagated.
I'll update the ChangeLog soon. But let me summarize my thought here. The main point is that 'selectstart' should be fired when selection started, however it cannot cross the ShadowDOM boundary. Let's consider <input> element. When text is selected, selectstart should be fired. However, on what? If it's fired in inner element of <input>, user cannot detect selectstart is fired. So it should be fired on <input> element itself. But we cannot always fire selectstart event on host element. When we have a content-editable element in Shadow DOM, selecting text on it should fire selectstart on the element itself. So I think we have to distinguish UA ShadowRoot from Author ShadowRoot here. If we have a more good way to do this, please tell me. I didn't come up with one.
Shinya Kawanaka
Comment 7
2013-01-10 20:37:32 PST
Created
attachment 182256
[details]
Patch
WebKit Commit Bot
Comment 8
2013-04-10 19:40:24 PDT
Comment on
attachment 182256
[details]
Patch Rejecting
attachment 182256
[details]
from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-commit-queue.appspot.com', '--bot-id=webkit-cq-03', 'apply-attachment', '--no-update', '--non-interactive', 182256, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: at 1612 (offset 21 lines). Hunk #3 FAILED at 1640. 1 out of 3 hunks FAILED -- saving rejects to file Source/WebCore/editing/FrameSelection.cpp.rej patching file LayoutTests/ChangeLog Hunk #1 succeeded at 1 with fuzz 3. patching file LayoutTests/fast/dom/shadow/selectstart-expected.txt patching file LayoutTests/fast/dom/shadow/selectstart.html Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force', '--reviewer', 'Ryosuke Niwa']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Full output:
http://webkit-commit-queue.appspot.com/results/17631068
Ryosuke Niwa
Comment 9
2019-10-04 22:51:27 PDT
selectstart works in v1 implementation. LayoutTests/fast/shadow-dom/trusted-event-scoped-flags.html tests this.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug