Opened 10 years ago
Closed 10 years ago
#36165 closed defect (bug) (fixed)
HRs insert non-breaking into the editor (only viewable from text mode)
| Reported by: | melchoyce | Owned by: | azaozz |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.5 |
| Component: | TinyMCE | Version: | 4.6 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: | administration |
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
@
10 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
@
10 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
@
10 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
@
10 years ago
- Milestone Future Release → 4.5
- Version → 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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.