1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

Handle window.beforeunload event

Closes #1041
This commit is contained in:
nowrep 2014-01-02 12:09:04 +01:00
parent 93927dfa1e
commit 1fd1691ee2

View File

@ -467,6 +467,12 @@ void TabWidget::closeTab(int index, bool force)
}
}
// window.beforeunload handling
webView->load(QUrl());
if (webView->url() != QUrl()) {
return;
}
m_locationBars->removeWidget(webView->webTab()->locationBar());
disconnect(webView, SIGNAL(wantsCloseTab(int)), this, SLOT(closeTab(int)));
disconnect(webView, SIGNAL(changed()), mApp, SLOT(setStateChanged()));