Opened 12 years ago
Closed 12 years ago
#22766 closed defect (bug) (fixed)
TinyMCE Unable to Delete Weird HTML Elements
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.5.1 | Priority: | normal |
Severity: | normal | Version: | 3.5 |
Component: | TinyMCE | Keywords: | |
Focuses: | Cc: |
Description
I somehow managed to get a post like this (Copying from Text tab in the editor):
<img class="alignnone size-medium wp-image-undefined" alt="" src="undefined" height="undefined" width="undefined" /> Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!
When I place the caret right before the Welcome word and try deleting the image using backspace, it deletes the space in between the image and the word Welcome, and moves the text to the next line.
3.4.2 seems to be able to delete the image just fine.
Change History (15)
#3
@
12 years ago
- Priority changed from normal to low
- Severity changed from normal to minor
Works properly in Firefox and IE, seems only WebKit browsers hesitate when deleting an image that way. Also selecting the actual image and deleting it either with backspace or delete keys works as expected.
#5
@
12 years ago
Also works as expected with Safari 6 (Mac). I guess this is a Chrome 23 (Mac) issue, rather than a TinyMCE issue.
#7
@
12 years ago
- Priority changed from low to normal
- Severity changed from minor to normal
If this is a regression from 3.4.2, this is not minor severity or low priority.
How did you end up with the "undefined" bits?
#8
follow-up:
↓ 9
@
12 years ago
Not sure, I was messing with the media modal (adding images, deleting them permanently etc.) and somehow ended up with that. That was two weeks ago, so I can't remember. All I know is that I did not modify it manually.
Two weeks -> More than a week.
#9
in reply to:
↑ 8
@
12 years ago
Replying to merty:
Not sure, I was messing with the media modal (adding images, deleting them permanently etc.) and somehow ended up with that. That was two weeks ago, so I can't remember. All I know is that I did not modify it manually.
Two weeks -> More than a week.
Okay, that was probably when MCE views were still in core.
Nonetheless, it should still be deletable.
#11
@
12 years ago
This seems like a regression upstreams. In WebKit when loading the HTML into TinyMCE, if a text node after an image node starts with a space, the space is replaced with
. This works in TinyMCE 3.4.9 (WordPress 3.4) but doesn't seem to work consistently in TinyMCE 3.5.7 and 3.5.8. Made a test on the TinyMCE JS Fiddle page: http://fiddle.tinymce.com/z0caab/5
#12
@
12 years ago
- Milestone changed from Awaiting Review to 3.5.1
So:
- This is only in Chrome/Webkit.
- It is inconsistent.
- It is only for hitting backspace, if you haven't yet clicked on the image.
- If the backspace key doesn't work, chances are the next thing you will do is click on the image anyway.
- Our delete button from the wpeditimage plugin still works.
- It's annoying, but not a blocker.
With that, I'm moving this to 3.5.1.
Relevant IRC discussion: https://irclogs.wordpress.org/chanlog.php?channel=wordpress-dev&day=2012-12-06&sort=asc#m509233.
http://files.mertyazicioglu.com/public/backspace.mov