We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f024ecd commit 6cebc83Copy full SHA for 6cebc83
src/components/terminal/terminalTouchSelection.js
@@ -944,6 +944,14 @@ export default class TerminalTouchSelection {
944
945
menuX = centerX - menuWidth / 2;
946
menuY = baseY + this.cellDimensions.height + 40;
947
+
948
+ // If menu would overflow below, prefer placing it above selection.
949
+ const maxY = containerRect.height - menuHeight - 10;
950
+ if (menuY > maxY) {
951
+ const topY =
952
+ startPos && endPos ? Math.min(startPos.y, endPos.y) : baseY;
953
+ menuY = topY - menuHeight - 10;
954
+ }
955
} else {
956
menuX = (containerRect.width - menuWidth) / 2;
957
menuY = containerRect.height - menuHeight - 20;
0 commit comments