diff --git a/src/frontends/qt/GuiWorkArea.cpp b/src/frontends/qt/GuiWorkArea.cpp index 87181f95e9..7433c28485 100644 --- a/src/frontends/qt/GuiWorkArea.cpp +++ b/src/frontends/qt/GuiWorkArea.cpp @@ -652,6 +652,10 @@ void GuiWorkArea::contextMenuEvent(QContextMenuEvent * e) ++pos.rx(); } } + if (e->reason() == QContextMenuEvent::Keyboard) + // Subtract the top margin + pos.setY(pos.y() - d->buffer_view_->topMargin()); + name = d->buffer_view_->contextMenu(pos.x(), pos.y()); }