WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
47551
Can't unlink image in contenteditable div if there is not text before it
https://bugs.webkit.org/show_bug.cgi?id=47551
Summary
Can't unlink image in contenteditable div if there is not text before it
Raymond
Reported
2010-10-12 12:10:06 PDT
Step to reproduce (Sample code attached): 1. Setup a div with contenteditable attribute. 2. Place a linked image as the div's FIRST decedent 3. And have some text as the div's SECOND decedent. 3. Setup javascript to fire up an document.execCommand('unlink'); against that linked image. Expected result: 1. Linked image should be unlinked. Actual result: 2. Linked image will not be unlinked.
Attachments
html code
(593 bytes, text/html)
2010-10-12 12:10 PDT
,
Raymond
no flags
Details
image
(24.62 KB, image/jpeg)
2010-10-12 12:11 PDT
,
Raymond
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Raymond
Comment 1
2010-10-12 12:10:48 PDT
Created
attachment 70552
[details]
html code
Raymond
Comment 2
2010-10-12 12:11:07 PDT
Created
attachment 70553
[details]
image
Raymond
Comment 3
2010-10-12 12:12:27 PDT
Sorry for the spelling. I mean "descendant" but not decedent
Ryosuke Niwa
Comment 4
2010-10-12 15:10:59 PDT
(In reply to
comment #0
)
> Step to reproduce (Sample code attached): > > 1. Setup a div with contenteditable attribute. > 2. Place a linked image as the div's FIRST decedent > 3. And have some text as the div's SECOND decedent. > 3. Setup javascript to fire up an document.execCommand('unlink'); against that linked image.
This is an interesting bug. I can remove the link if I just select the image but fails to remove if I selected all all the contents in the div (command+a on Mac / control+a on Windows).
Raymond
Comment 5
2010-10-13 10:38:48 PDT
I am sorry I forgot to mentioned another important criteria, the image inside the div should be align="right"
Aryeh Gregor
Comment 6
2011-08-19 14:17:30 PDT
Cannot reproduce in Chrome 15.0.849.0 dev. The test-case behaves as expected, the link is removed if I select everything with Ctrl-A.
Ryosuke Niwa
Comment 7
2011-08-19 14:30:51 PDT
(In reply to
comment #6
)
> Cannot reproduce in Chrome 15.0.849.0 dev. The test-case behaves as expected, the link is removed if I select everything with Ctrl-A.
You're right. Must have been fixed at some point. We should probably add a regression test to ensure this does not regress in the future.
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