diff --git a/js/ui/shellEntry.js b/js/ui/shellEntry.js index 884efc6b5..c6e35fa83 100644 --- a/js/ui/shellEntry.js +++ b/js/ui/shellEntry.js @@ -116,7 +116,8 @@ function _onButtonPressEvent(actor, event, entry) { } function _onPopup(actor, entry) { - let [success, textX, textY_, lineHeight_] = entry.clutter_text.position_to_coords(-1); + let cursorPosition = entry.clutter_text.get_cursor_position(); + let [success, textX, textY_, lineHeight_] = entry.clutter_text.position_to_coords(cursorPosition); if (success) entry.menu.setSourceAlignment(textX / entry.width); entry.menu.open(BoxPointer.PopupAnimation.FULL);