Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#42908 closed defect (bug) (fixed)

4.9.1 Bug Found in TinyMCE Visual/Text Tab

Reported by: othellobloke's profile othellobloke Owned by: azaozz's profile azaozz
Milestone: 4.9.3 Priority: normal
Severity: normal Version: 4.9.1
Component: TinyMCE Keywords: needs-patch
Focuses: Cc:

Description

I raised my question here: https://wordpress.org/support/topic/switching-between-visual-text-tab-inserts-invisible-span/

When we type something in the visual editor and then click on the Text tab, it inserts the following:

<span style="display: inline-block; width: 0px; overflow: hidden; line-height: 0;" data-mce-type="bookmark" class="mce_SELRES_start"></span>

and then when switching back to Visual it erases what we wrote. But then when we switch back to the Text tab, the span I pasted above keeps getting appended to the one already there.

Change History (10)

#1 follow-up: @azaozz
7 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Hi @othellobloke, from the support forum thread seems this was an issue with a specific theme that has been resolved. Closing as invalid, feel free to reopen with more info and steps to reproduce on a clean install.

#2 @lizkarkoski
7 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

This error also occurs in WordPress.com. I was able to reproduce on a test site using Twenty Seventeen following up on user reports that came to me in the forums: http://en.forums.wordpress.com/topic/change-speed-of-slide-show-in-dara-theme

WordPress.com themes affected: Dara, Twenty Seventeen (I did not test additional WP.com themes)

To reproduce

  • add the shortcode for the image slideshow in to a new post. It doesn't matter if you use Calypso or WP-Admin, as both are affected.
  • add the "false" parameter to keep the slideshow from auto starting
  • switch back to the visual editor, the "false" parameter does not work
  • switch back to text editor and see the additional code that's been added https://screenshots.firefox.com/Qj0y2yZpdbtFVslK/wordpress.com

The "false" parameter will stick if you do not leave the text editor and save the post and publish it from that view.

#3 in reply to: ↑ 1 ; follow-up: @othellobloke
7 years ago

Replying to azaozz:

Hi @othellobloke, from the support forum thread seems this was an issue with a specific theme that has been resolved. Closing as invalid, feel free to reopen with more info and steps to reproduce on a clean install.

It's not a theme issue. It's a TinyMCE issue.

#4 in reply to: ↑ 3 @azaozz
7 years ago

  • Milestone set to 4.9.3

Think I got to the bottom of this. It is a problem with shortcodes (again!) and keeping the scroll position. When switching Text => Visual the keep-position marker span gets stuck inside of the shortcode preview/placeholder. Then switching back to Text restores it as part of the shortcode. Having the cursor in that span or in the shortcode repeats this.

Replying to othellobloke:

Right, it is a problem with shortcodes, previews and keeping scroll position.

Patch coming up.

#5 @azaozz
7 years ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from reopened to closed

In 42574:

Editor: when keeping the scroll position treat all shortcodes as preview-able. Otherwise in some cases the marker span can get stuck inside the shortcode and break the markup.

Props azaozz, lizkarkoski and othellobloke for testing.
Fixes #42908 for trunk.

#6 @azaozz
7 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopen for 4.9.3.

#7 @azaozz
7 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 42575:

Merged revision 42574 from trunk:

Editor: when keeping the scroll position treat all shortcodes as preview-able. Otherwise in some cases the marker span can get stuck inside the shortcode and break the markup.

Props azaozz, lizkarkoski and othellobloke for testing.
Fixes #42908 for 4.9.3.

#8 @asadmalikdotpk
7 years ago

Have the same issue using WordPress latest Version with Visual composer:
<span style="display: inline-block; width: 0px; overflow: hidden; line-height: 0;" data-mce-type="bookmark" class="mce_SELRES_start"></span>

#9 @eclare
6 years ago

  • Keywords needs-patch added

Same issue here on a WordPres.org install (latest version), using a self-built theme and no Visual Composer. I do run Windows Vista with an outdated Chrome though, but I doubt that's an issue here.

#10 @archon810
5 years ago

Still a problem that exists in the latest WP 5.3.2.

Note: See TracTickets for help on using tickets.