[wp-trac] [WordPress Trac] #45947: More tag breaks when switching from Text to Visual when cursor left in HTML
WordPress Trac
noreply at wordpress.org
Thu Jan 17 19:02:06 UTC 2019
#45947: More tag breaks when switching from Text to Visual when cursor left in HTML
----------------------------+------------------------------
Reporter: jeremeylduvall | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: 5.0.3
Severity: normal | Resolution:
Keywords: | Focuses:
----------------------------+------------------------------
Comment (by iCaleb):
I can replicate consistently. This also occurs with the `<!--nextpage-->`
tag.
It has to do with the content.replace() call here:
https://github.com/WordPress/WordPress/blob/6ffafa5bc7124dd58a292720fea49465297f452c
/wp-includes/js/tinymce/plugins/wordpress/plugin.js#L108
It also matters where your cursor is exactly. For example, if your cursor
is between the `p` and the `a` in `nextpage` before you switch back to the
visual editor, you end up with this in the content:
`<!--nextp<span data-mce-type="bookmark" style="display: inline-block;
width: 0px; overflow: hidden; line-height: 0;"
class="mce_SELRES_start"></span>age-->`
And when it is in between the `m` and `o` in `more`:
`<!--m<span data-mce-type="bookmark" style="display: inline-block; width:
0px; overflow: hidden; line-height: 0;"
class="mce_SELRES_start"></span>ore-->`
A google search for `"data-mce-type="bookmark"` shows many other similar
issues.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45947#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list