Fix showing native dir selection from web view

This commit is contained in:
Martchus 2018-10-28 17:04:10 +01:00
parent cdff9fd974
commit e59a80c0f6
1 changed files with 2 additions and 1 deletions

View File

@ -56,7 +56,6 @@ WebPage::WebPage(WebViewDialog *dlg, SYNCTHINGWIDGETS_WEB_VIEW *view)
connect(&Data::networkAccessManager(), &QNetworkAccessManager::sslErrors, this,
static_cast<void (WebPage::*)(QNetworkReply *, const QList<QSslError> &errors)>(&WebPage::handleSslErrors));
#endif
connect(this, &SYNCTHINGWIDGETS_WEB_PAGE::loadFinished, this, &WebPage::injectJavaScripts);
if (!m_view) {
// initialization for new window
@ -269,6 +268,8 @@ void WebPage::processJavaScriptConsoleMessage(const QString &message)
#endif
if (message.startsWith(QLatin1String("nativeInterface.showFolderPathSelection: "))) {
showFolderPathSelection(message.mid(41));
} else if (message == QLatin1String("UIOnline")) {
injectJavaScripts(true);
}
}