mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +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";
|
title += " on link";
|
||||||
}
|
}
|
||||||
|
|
||||||
QWebElement element = r.element();
|
if (r.isContentEditable()) {
|
||||||
if (!element.isNull() && (element.tagName().toLower() == "input" || element.tagName().toLower() == "textarea")) {
|
|
||||||
title += " on input";
|
title += " on input";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -511,8 +511,7 @@ void WebView::createContextMenu(QMenu* menu, const QWebHitTestResult &hitTest, c
|
|||||||
createMediaContextMenu(menu, hitTest);
|
createMediaContextMenu(menu, hitTest);
|
||||||
}
|
}
|
||||||
|
|
||||||
QWebElement element = hitTest.element();
|
if (hitTest.isContentEditable()) {
|
||||||
if (!element.isNull() && (element.tagName().toLower() == "input" || element.tagName().toLower() == "textarea")) {
|
|
||||||
if (menu->isEmpty()) {
|
if (menu->isEmpty()) {
|
||||||
QMenu* pageMenu = page()->createStandardContextMenu();
|
QMenu* pageMenu = page()->createStandardContextMenu();
|
||||||
|
|
||||||
@ -523,10 +522,13 @@ void WebView::createContextMenu(QMenu* menu, const QWebHitTestResult &hitTest, c
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hiding double Direction menu (bug in QtWebKit 2.2)
|
// Hiding double Direction + Fonts menu (bug in QtWebKit 2.2)
|
||||||
if (i == 0 && act->menu()) {
|
if (i <= 1 && act->menu()) {
|
||||||
|
if (act->menu()->actions().contains(pageAction(QWebPage::SetTextDirectionDefault)) ||
|
||||||
|
act->menu()->actions().contains(pageAction(QWebPage::ToggleBold))) {
|
||||||
act->setVisible(false);
|
act->setVisible(false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
menu->addAction(act);
|
menu->addAction(act);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user