mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
Fixed showing edit context menu on gmail.com
This commit is contained in:
parent
88de940dc1
commit
119090c28c
@ -87,8 +87,7 @@ void TestPlugin::populateWebViewMenu(QMenu* menu, WebView* view, const QWebHitTe
|
||||
title += " on link";
|
||||
}
|
||||
|
||||
QWebElement element = r.element();
|
||||
if (!element.isNull() && (element.tagName().toLower() == "input" || element.tagName().toLower() == "textarea")) {
|
||||
if (r.isContentEditable()) {
|
||||
title += " on input";
|
||||
}
|
||||
|
||||
|
@ -185,9 +185,9 @@ QString QupZillaSchemeReply::aboutPage()
|
||||
|
||||
aPage.replace("%VERSION-INFO%",
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Version"), QupZilla::VERSION
|
||||
#ifdef GIT_REVISION
|
||||
#ifdef GIT_REVISION
|
||||
+ " (" + GIT_REVISION + ")"
|
||||
#endif
|
||||
#endif
|
||||
) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("WebKit version"), QupZilla::WEBKITVERSION));
|
||||
aPage.replace("%MAIN-DEVELOPER%", tr("Main developer"));
|
||||
@ -316,9 +316,9 @@ QString QupZillaSchemeReply::configPage()
|
||||
|
||||
cPage.replace("%VERSION-INFO%",
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Application version"), QupZilla::VERSION
|
||||
#ifdef GIT_REVISION
|
||||
#ifdef GIT_REVISION
|
||||
+ " (" + GIT_REVISION + ")"
|
||||
#endif
|
||||
#endif
|
||||
) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Qt version"), QT_VERSION_STR) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("WebKit version"), QupZilla::WEBKITVERSION) +
|
||||
|
@ -511,8 +511,7 @@ void WebView::createContextMenu(QMenu* menu, const QWebHitTestResult &hitTest, c
|
||||
createMediaContextMenu(menu, hitTest);
|
||||
}
|
||||
|
||||
QWebElement element = hitTest.element();
|
||||
if (!element.isNull() && (element.tagName().toLower() == "input" || element.tagName().toLower() == "textarea")) {
|
||||
if (hitTest.isContentEditable()) {
|
||||
if (menu->isEmpty()) {
|
||||
QMenu* pageMenu = page()->createStandardContextMenu();
|
||||
|
||||
@ -523,10 +522,13 @@ void WebView::createContextMenu(QMenu* menu, const QWebHitTestResult &hitTest, c
|
||||
continue;
|
||||
}
|
||||
|
||||
// Hiding double Direction menu (bug in QtWebKit 2.2)
|
||||
if (i == 0 && act->menu()) {
|
||||
// Hiding double Direction + Fonts menu (bug in QtWebKit 2.2)
|
||||
if (i <= 1 && act->menu()) {
|
||||
if (act->menu()->actions().contains(pageAction(QWebPage::SetTextDirectionDefault)) ||
|
||||
act->menu()->actions().contains(pageAction(QWebPage::ToggleBold))) {
|
||||
act->setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
menu->addAction(act);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user