1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

Fixed crash with "Allow js to disable context menu" option.

See f6de3bd5a0
This commit is contained in:
nowrep 2013-02-06 23:44:45 +01:00
parent f6de3bd5a0
commit 24957fd537

View File

@ -682,8 +682,13 @@ void WebView::showClickedFrameSource()
bool WebView::event(QEvent* event)
{
if (event->type() == QEvent::ContextMenu && !qzSettings->allowJsDisableContextMenu) {
contextMenuEvent(static_cast<QContextMenuEvent*>(event));
return true;
QContextMenuEvent* ev = static_cast<QContextMenuEvent*>(event);
const QWebHitTestResult &hitTest = page()->mainFrame()->hitTestContent(ev->pos());
if (!hitTest.isContentEditable()) {
contextMenuEvent(ev);
return true;
}
}
return QWebView::event(event);