WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
127690
execCommand('insertHTML', ...) creates nested paragraphs under very specific circumstances
https://bugs.webkit.org/show_bug.cgi?id=127690
Summary
execCommand('insertHTML', ...) creates nested paragraphs under very specific ...
Tim Molendijk
Reported
2014-01-27 11:02:20 PST
Steps to reproduce the problem: 1. Open provided URL 2. Click button to execute code as described on its label 3. Notice how a nested paragraph structure has been created (and the first inserted paragraphs ends up last in the created DOM tree - but that's probably related) What is the expected behavior? What Firefox does: create a DOM tree that looks like this: <p>1st inserted</p> <p><br></p> <p><br></p> What went wrong? Instead it creates a DOM tree that looks like this: <p><p></p></p> <p>1st inserted</p> Does it occur on multiple sites: Yes Is it a problem with a plugin? No Did this work before? N/A Does this work in other browsers? No Safari (verified v7.0.1) Chrome version: 34.0.1797.2 Channel: dev OS Version: OS X 10.9.1 Flash Version: Shockwave Flash 12.0 r0 As soon as a layout is applied to all paragraphs, this misbehavior disappears. Or when the br element is removed from the initial contenteditable, this misbehavior disappears. And probably several more subtle requirements that I haven't discovered.
Attachments
Add attachment
proposed patch, testcase, etc.
Tim Molendijk
Comment 1
2014-01-27 11:15:00 PST
I'm not sure whether "layout is applied" in the last paragraph is correct. I _am_ sure that when you apply min-height to every p (in CSS), the problem goes away.
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