mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
Fixed crash with "Allow js to disable context menu" option.
See f6de3bd5a0
This commit is contained in:
parent
f6de3bd5a0
commit
24957fd537
@ -682,9 +682,14 @@ void WebView::showClickedFrameSource()
|
||||
bool WebView::event(QEvent* event)
|
||||
{
|
||||
if (event->type() == QEvent::ContextMenu && !qzSettings->allowJsDisableContextMenu) {
|
||||
contextMenuEvent(static_cast<QContextMenuEvent*>(event));
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user