mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
Fixed opening target=_blank links in new tab.
Regression from b7cc728d63610978dbac37238b00f0e08cf58ddc#L3R102
This commit is contained in:
parent
b70fc83474
commit
772440d86c
@ -102,8 +102,10 @@ void PopupWebPage::checkBehaviour()
|
|||||||
// If menubar/statusbar/toolbar visibility is explicitly set in window.open call,
|
// If menubar/statusbar/toolbar visibility is explicitly set in window.open call,
|
||||||
// at least one of those variables will be false.
|
// at least one of those variables will be false.
|
||||||
// If so, we should open new window.
|
// 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;
|
m_createNewWindow = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,34 +7,43 @@
|
|||||||
<h2>Popup windows test</h2>
|
<h2>Popup windows test</h2>
|
||||||
<b>Will be opened in new tab</b>
|
<b>Will be opened in new tab</b>
|
||||||
<p>
|
<p>
|
||||||
|
<a href="popup.html" target="_blank">Classic link</a>
|
||||||
|
- target="_blank" link has to be opened in new tab
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
<a href="javascript:window.open('popup.html')">Popup 1</a>
|
<a href="javascript:window.open('popup.html')">Popup 1</a>
|
||||||
- can be opened in new tab
|
- can be opened in new tab
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<a href="javascript:window.open('popup.html', '_blank')">Popup 1</a>
|
<a href="javascript:window.open('popup.html', '_blank')">Popup 2</a>
|
||||||
- with second argument _blank
|
- with second argument _blank
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
<a href="javascript:window.open('popup.html', '_blank', 'left=100,right=200')">Popup 3</a>
|
||||||
|
- with left and righ (should be opened as popup, but how to detect it?)
|
||||||
|
</p>
|
||||||
<b>Will be opened in popup window</b>
|
<b>Will be opened in popup window</b>
|
||||||
<p>
|
<p>
|
||||||
<a href="javascript:window.open('popup.html', '_blank', 'width=150,height=150')">Popup 1</a>
|
<a href="javascript:window.open('popup.html', '_blank', 'width=150,height=150')">Popup 4</a>
|
||||||
- with width and height
|
- with width and height
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<a href="javascript:window.open('popup.html', '_blank', 'width=150,height=150,left=15,top=20')">Popup 1</a>
|
<a href="javascript:window.open('popup.html', '_blank', 'width=150,height=150,left=15,top=20')">Popup 5</a>
|
||||||
- with width, height, left and top
|
- with width, height, left and top
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<a href="javascript:window.open('popup.html', '_blank', 'left=100,right=200')">Popup 1</a>
|
<a href="javascript:window.open('popup.html', '_blank', 'menubar=yes')">Popup 6</a>
|
||||||
- with left and righ
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
<a href="javascript:window.open('popup.html', '_blank', 'menubar=yes')">Popup 1</a>
|
|
||||||
- with menubar
|
- with menubar
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<a href="javascript:window.open('popup.html', '_blank', 'status=yes')">Popup 1</a>
|
<a href="javascript:window.open('popup.html', '_blank', 'status=yes')">Popup 7</a>
|
||||||
- with statusbar
|
- with statusbar
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
|
<p>
|
||||||
|
<a href="javascript:window.open('popup.html', '_blank', 'toolbar=yes')">Popup 8</a>
|
||||||
|
- with toolbar
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user