Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#32588 closed defect (bug) (fixed)

Preview window is reused even if the user navigates to another page

Reported by: iseulde's profile iseulde Owned by:
Milestone: 4.3 Priority: normal
Severity: normal Version:
Component: Editor Keywords: has-patch
Focuses: Cc:


To reproduce, preview a post. The preview will be loaded in a new tab. Go to that tab and navigate to another page (same/different domain). Go back and preview the post again. The preview is loaded in the same tab, so now I lost that document. I would expect the preview to load in a new tab if the URL changed.

It's pretty weird when tabs I knew I had open suddenly disappear.

Attachments (1)

32588.patch (1.3 KB) - added by azaozz 9 years ago.

Download all attachments as: .zip

Change History (8)

#1 @helen
9 years ago

Related: #20233, #32278 (which could use a response).

#2 @azaozz
9 years ago

We probably can output some (inline) JS to remove the on unload, then add it back in the new page header. Will need to pass the name as query arg for this to work.

This seems a little bit hacky and will need testing in all possible browsers.

9 years ago

#3 @azaozz
9 years ago

  • Keywords has-patch needs-testing added

32588.patch should do it. May need some review/improving.

#4 follow-up: @iseulde
9 years ago

  • Milestone changed from Awaiting Review to 4.3

Awesome, works well. Tested Chrome, FF, Safari and IE11, all work well. I also tested IE8 and it seems to break there. I get an AYS message. Without the patch it works.
And id seems unused in the script.

#5 @azaozz
9 years ago

In 32809:

Editor: do not reuse the preview tab when the user has navigated away.
See #32588.

#6 in reply to: ↑ 4 @azaozz
9 years ago

Replying to iseulde:

Actually this won't work in IE8 no matter what :)

Removed support for IE8. Seems to work well in all other common browsers, including emulated IE9 and 10. Leaving open in case there are any problems in (native) IE9 and/or other "exotic" browsers.

#7 @obenland
9 years ago

  • Keywords needs-testing removed
  • Resolution set to fixed
  • Status changed from new to closed

If there are problems we can open new bugs.

Note: See TracTickets for help on using tickets.