Opened 8 years ago
Closed 8 years ago
#36165 closed defect (bug) (fixed)
HRs insert non-breaking into the editor (only viewable from text mode)
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.5 | Priority: | normal |
Severity: | normal | Version: | 4.6 |
Component: | TinyMCE | Keywords: | |
Focuses: | administration | Cc: |
Description
When you insert a horizontal rule (<hr />
) into your post or page using the toolbar button, it also inserts a non-breaking space (
) right after it. The only way to delete this is to flip into the text editor and manually erase it.
Attachments (1)
Change History (7)
#2
@
8 years ago
Passing this upstream.
Thanks @azaozz!
In the meantime a workaround is to press backspace when this happens. That will remove the unwanted empty paragraph.
When I do that it deletes the HR. Only workaround I've found is to manually delete in the text tab. :/
#3
@
8 years ago
When I do that it deletes the HR.
Yeah, doesn't always work. There's more: if you insert a HR while the caret is in a heading tag, it creates an empty heading after the HR. So having a look in the Text editor seems the best thing for now.
#4
@
8 years ago
This was fixed in TinyMCE 4.3.8, see #36254, except one edge case: if the caret is at the end of inline tag (like <b>, <i>, etc.), that is at the end of a paragraph, the inline tag still gets split, then wrapped in a <p>. Later the empty inline tag gets removed, but the <p> remains.
#5
@
8 years ago
- Milestone changed from Future Release to 4.5
- Version set to trunk
This edge case is fixed with https://github.com/tinymce/tinymce/commit/b1618d1adb57df992ee69907b1cfff9aa4d53c80. We can backport that and close this ticket for 4.5.
Confirmed. Every time HR is inserted above a block element other than a paragraph, it inserts a new empty paragraph under the HR and places the caret in it. This is not WordPress specific, happens in the full featured TinyMCE demo: https://www.tinymce.com/docs/demo/full-featured/.
Passing this upstream. In the meantime a workaround is to press backspace when this happens. That will remove the unwanted empty paragraph.