Project

General

Profile

Actions

Bug #62503

closed

Chrome opens a new window instead of a tab on "save and close"

Added by Helmut Hummel over 9 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2014-10-27
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Browsers started to distinguish how opening a new window
from JavaScript happens. They track "user initiated"
opening and not user initiated opening and behave differently.

A request to open a window by JavaScript which is not
user initiated is caught by a pop up blocker most of the time nowadays.
This means a user must explicitly allow the current page to
open new windows by JavaScript.

Additionally some browsers (e.g. Chrome) always open a new window
instead of a new tab if the request is not user initiated, regardless
of browser settings, which nowadays default to open a new tab.

The "save and preview" button currently initiates a page reload
which saves the document and add some JavaScript to to open a preview
window in the HTML response of this action.
This JavaScript action is then not considered to be user initiated any more
as opening the new window does not follow a direct user click action.

The result is, that if a preview window/tab was opened previously, then
the preview/window tab is just reloaded with the new preview URL.
If it is the first time the window/tab should be opened this request
is caught by the popup blocker.

Other preview buttons in the backend (from Click Menu or action toolbar)
behave differently (correctly) as they are always identified as user initiated.

For that reasons, change the "save and preview" button to directly
open a new window on click (without URL) and let the HTML/ JavaScript response
set the correct preview URL after that.

By doing so we gain a consistent behavior no matter what preview button a user
clicks first.
The only downside is, that in case the preview window is opened
the first time, it remains empty until the page is saved and then reloaded
through the JavaScript code that is already present.

See http://stackoverflow.com/questions/15818892/chrome-javascript-window-open-in-new-tab for a detailed description about browser behavior.


Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #38451: BE: When saving content, Chrome opens new popup window instead of new tab Closed2012-06-28

Actions
Actions #1

Updated by Gerrit Code Review over 9 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/33576

Actions #2

Updated by Gerrit Code Review over 9 years ago

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/33590

Actions #3

Updated by Helmut Hummel over 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #4

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF