[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 23:07:44 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:  TinyMCE         |     Version:  5.0.3
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+------------------------------

Comment (by iCaleb):

 The above ticket pointed me in the right direction. The solution here it
 to move the cursor outside of the HTML comment when switching views. This
 is already done for HTML tags and shortcodes.

 I've also found that this will help with those editing ex-gutenberg posts,
 as this bug could mess up a post very badly otherwise.

 Testing is fairly straightforward. Create HTML comments, and place your
 cursor inside of them while switching between visual and text mode. Patch
 incoming, and props to @davidsword for the regex help :)

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45947#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list