[wp-trac] [WordPress Trac] #38867: Changesets : opening a link from the preview as a new browser tab can be confusing

WordPress Trac noreply at wordpress.org
Sat Nov 19 18:45:25 UTC 2016


#38867: Changesets : opening a link from the preview as a new browser tab can be
confusing
--------------------------+--------------------------
 Reporter:  nikeo         |       Owner:  westonruter
     Type:  defect (bug)  |      Status:  accepted
 Priority:  normal        |   Milestone:  4.7
Component:  Customize     |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:  ui
--------------------------+--------------------------
Changes (by westonruter):

 * keywords:   => needs-patch
 * owner:   => westonruter
 * status:  new => accepted
 * milestone:  Awaiting Review => 4.7


Comment:

 @nikeo That's interesting as I've never heard of or seen someone open a
 link in the preview in a new tab as part of their workflow. I can see how
 that would be a useful, but it does seem like a hack. For a permanent
 solution in the future I'll note that that Customize Snapshots plugin
 (currently being refactored for 4.7-compat) has a dedicated link to open
 the current preview into a new window without the iframe. See also
 https://github.com/xwp/wp-customize-snapshots/issues/101

 For the time being I think what we could do is simply omit the
 `customize_messenger_channel` from being injected into the URL query
 params for the links in the preview. It is this query parameter that
 signals that the preview is “passive” to the control of the pane, and thus
 the admin bar is hidden and any clicks on links will send a `url` message
 to the parent window to let it instantiate a new `PreviewFrame` to load
 the new URL. The `customize_messenger_channel` query parameter is already
 being forcibly added to the URL in `wp.customize.Previewer.prototype.run`,
 so it's not necessary to also have it in the query params in the preview.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38867#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list