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:
parent
f6de3bd5a0
commit
24957fd537
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user