diff --git a/src/lib/popupwindow/popupwebpage.cpp b/src/lib/popupwindow/popupwebpage.cpp index b16b9505d..d3054d812 100644 --- a/src/lib/popupwindow/popupwebpage.cpp +++ b/src/lib/popupwindow/popupwebpage.cpp @@ -102,8 +102,10 @@ void PopupWebPage::checkBehaviour() // If menubar/statusbar/toolbar visibility is explicitly set in window.open call, // at least one of those variables will be false. // If so, we should open new window. + // But not when all visibilities are false, it occurs with target=_blank links - if (!m_createNewWindow && (!m_menuBarVisible || !m_statusBarVisible || !m_toolBarVisible)) { + if (!m_createNewWindow && (!m_menuBarVisible || !m_statusBarVisible || !m_toolBarVisible) + && !(!m_menuBarVisible && !m_statusBarVisible && !m_toolBarVisible)) { m_createNewWindow = true; } diff --git a/tests/popupwindows.html b/tests/popupwindows.html index 593809a2e..a256817e5 100644 --- a/tests/popupwindows.html +++ b/tests/popupwindows.html @@ -7,34 +7,43 @@

Popup windows test

Will be opened in new tab

+Classic link +- target="_blank" link has to be opened in new tab +

+

Popup 1 - can be opened in new tab

-Popup 1 +Popup 2 - with second argument _blank

+

+Popup 3 +- with left and righ (should be opened as popup, but how to detect it?) +

Will be opened in popup window

-Popup 1 +Popup 4 - with width and height

-Popup 1 +Popup 5 - with width, height, left and top

-Popup 1 -- with left and righ -

-

-Popup 1 +Popup 6 - with menubar

-Popup 1 +Popup 7 - with statusbar

+

+Popup 8 +- with toolbar +

+