WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#32278 closed defect (bug) (wontfix)

Preview button opens multiple tabs if preview post contains a tinymce

Reported by: elliotcondon Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.2.1
Component: Editor Keywords: close
Focuses: Cc:

Description

Hi guys,

Here's an odd one for you.

If a tinymce instance exists when viewing a post (perhaps in the post's comment form), clicking the 'preview' button for this post (whilst editing) will create a new (browser) tab instead of updating just the one (browser) tab as expected.

It seems that enqueuing the tinymce scripts is fine, just when the tinymce is instantiated does the problem exist.

I've taken a look but can't find any reason for this, the post.js #preview-post event seems simple and would not be affected by a tinymce editor.

Perhaps the newly created tinymce instance is removing some sort of global 'target' that the form uses? I don't know...

In no way is this an important issue, but perhaps this may come up in the future, and I just wanted to provide some info about it.

Thanks
E

Change History (2)

#1 @azaozz
5 years ago

  • Keywords close added

Don't think TinyMCE changes the window name. The name is removed in post.js. That may be loaded on the front-end, or some functionality copied from there.

In any case, this is a precaution as opening a preview then using TinyMCE in it might lead to loosing some user input.

Suggesting "wontfix" as opening previews in new tabs is safer.

#2 @wonderboymusic
5 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.