WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
89054
document.execCommand('Indent') removes Shadow DOM.
https://bugs.webkit.org/show_bug.cgi?id=89054
Summary
document.execCommand('Indent') removes Shadow DOM.
Shinya Kawanaka
Reported
2012-06-13 19:43:44 PDT
Repro: <div contenteditable> BEFORE HOST <div id="host">HOST</div> AFTER HOST </div> Shadow DOM for host <span>BEFORE SHADOW<shadow></shadow>AFTER SHADOW</span> When performing document.execCommand('Indent') in BEFORE HOST, the Shadow DOM for host disappears.
Attachments
Add attachment
proposed patch, testcase, etc.
Shinya Kawanaka
Comment 1
2012-06-13 21:56:07 PDT
This is because node->cloneNode() does not clone Shadow DOM. However, if we clone Shadow DOM always, it might be harmful for existing elements e.g. <input> etc. We should think this more.
Shinya Kawanaka
Comment 2
2012-06-13 21:56:35 PDT
See also: CompositeEditCommand::moveParagraphWithClones()
Shinya Kawanaka
Comment 3
2012-06-22 14:40:17 PDT
We should discuss how do we clone Shadow DOM (or do not clone Shadow DOM) before fixing this problem.
Hayato Ito
Comment 4
2012-06-22 16:00:50 PDT
I think editing command should treat pure DOM structures in general. That means if we clone some nodes in editing, it is okay that everything that can not be serialized into text is not cloned. like event listeners or attached Shadow DOM created by user. So I vote for WONTFIX for now. (In reply to
comment #3
)
> We should discuss how do we clone Shadow DOM (or do not clone Shadow DOM) before fixing this problem.
Shinya Kawanaka
Comment 5
2012-06-22 17:26:59 PDT
(In reply to
comment #4
)
> I think editing command should treat pure DOM structures in general. > That means if we clone some nodes in editing, it is okay that everything that can not be serialized into text is not cloned. like event listeners or attached Shadow DOM created by user. > > So I vote for WONTFIX for now. > > (In reply to
comment #3
) > > We should discuss how do we clone Shadow DOM (or do not clone Shadow DOM) before fixing this problem.
Yeah, I agree with you. Something weid things like disappearing Shadow DOM or Event Listeners etc. cannot be evitable for now. We should discuss this more, but we have higher priority things than this. I vote for closing as LATER.
Ryosuke Niwa
Comment 6
2012-06-22 17:34:28 PDT
This is same thing as shadow DOM being lost in copy & paste. Won't fix.
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