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";
|
||||
}
|
||||
|
||||
|
@ -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