Make WordPress Core

Opened 3 years ago

Closed 20 months ago

#22567 closed defect (bug) (wontfix)

Preview button triggers popup blocker in some browsers if no title is set

Reported by: miqrogroove Owned by:
Milestone: Priority: normal
Severity: minor Version:
Component: Editor Keywords: has-patch
Focuses: Cc:


Steps to reproduce:

  1. Click on Add New (for a post)
  2. DO NOT enter a title.
  3. Start typing in the post body.
  4. Click Preview

Expected result:

New tab opens with preview.

Actual result:

If popup blocking is disabled, a new window opens with the preview. On subsequent clicks of the Preview button, it reverts to opening a new tab as it should.

Found in WordPress 3.5-RC1.

Attachments (2)

22567.patch (13.9 KB) - added by mario-siteground 3 years ago.
Patch adding async false
22567-new.patch (431 bytes) - added by mario-siteground 3 years ago.
Update with proper tabs

Download all attachments as: .zip

Change History (12)

comment:1 @miqrogroove3 years ago

Able to reproduce this in Chrome, Firefox, and IE, but not in Opera.

comment:2 @miqrogroove3 years ago

  • Summary changed from Preview Button Triggering Popup Blocker in RC1 to Preview Button Triggering Popup Blocker
  • Version changed from trunk to 3.2

ocean90 says this goes back to 3.2. Is there another ticket?

comment:3 @ocean903 years ago

  • Severity changed from major to normal
  • Summary changed from Preview Button Triggering Popup Blocker to Preview button triggers popup blocker in some browsers if no title is set
  • Version 3.2 deleted

Even 2.9 and probably before.

@mario-siteground3 years ago

Patch adding async false

comment:4 @mario-siteground3 years ago

  • Keywords has-patch added

Disabling the autosave async mode seems to be fixing the issue without causing any extra troubles (tested in trunk and 3.4)

comment:5 @SergeyBiryukov3 years ago

There's no need to patch minified files, a post-commit bot takes care of that.

Also, please use tabs rather than spaces (per WordPress Coding Standards).

@mario-siteground3 years ago

Update with proper tabs

comment:6 @mario-siteground3 years ago

Sergey, better now?

comment:7 @SergeyBiryukov3 years ago

22567-new.patch looks proper and appears to fix the issue in my testing.

comment:8 @MikeHansenMe3 years ago

  • Cc mdhansen@… added

I actually cam across this the other day as well. Tested 22567-new.patch and it corrected the problem for me as well.

Version 0, edited 3 years ago by MikeHansenMe (next)

comment:9 @miqrogroove2 years ago

I'm pretty sure this just happened in a new post with a title in 3.6 and Chrome. It was a quickie test post in the Text tab and I went straight to preview instead of saving anything first.

comment:10 @azaozz20 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Severity changed from normal to minor
  • Status changed from new to closed

Don't think blocking JS while autosave runs (synchronous XHR) is a good idea. Considering that popup blocking is enabled by default in all browsers, and that the problem is whether the preview opens in a tab or a window, this seems rare and minor.

If there is another way to fix it, feel free to reopen the ticket.

Note: See TracTickets for help on using tickets.