WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#31676 closed defect (bug) (duplicate)

  being inserted in visual editor when highlighting and overwriting text

Reported by: AdamCapriola Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: TinyMCE Keywords:
Focuses: Cc:

Description

I've noticed   characters in my content at times when inspecting the HTML of published posts, which is troublesome because the typeface I'm using treats the spacing of   and regular spaces differently, and I think I've finally figured out how to replicate the inserting of these rogue  .

  1. Have content in the visual editor.
  1. Highlight some of the text.
  1. Overwrite the text, press spacebar, type some more text, and press spacebar again.
  1. Now preview the post and inspect the paragraph:

Voila.  

I am on OSX 10.10.2 and am replicating this on Chrome. This ticket might be related: https://core.trac.wordpress.org/ticket/31157

Attachments (2)

Screen Shot 2015-04-24 at 11.13.11.png (21.3 KB) - added by iseulde 4 years ago.
Screen Shot 2015-04-24 at 11.14.29.png (18.6 KB) - added by iseulde 4 years ago.

Download all attachments as: .zip

Change History (6)

#1 @AdamCapriola
4 years ago

Here are some screencaps of the process:

http://i.imgur.com/P6jfNeM.png

http://i.imgur.com/7DRPSOS.png

http://i.imgur.com/cfaGzCA.png

#2 @iseulde
4 years ago

It looks like TinyMCE creates a new text node for that edit and then pads the end with   if you use a space.

#3 @Kuzmanov
4 years ago

It appears only if you're doing a double space.

#4 @iseulde
4 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Version 4.1.1 deleted

It looks like that's just contenteditable doing it. Spaces are padded at the end of text nodes. I'm going to close this as a duplicate of #31157 since it's the same issue really. Text nodes are padded with   in Chrome.

Last edited 4 years ago by iseulde (previous) (diff)
Note: See TracTickets for help on using tickets.