convergencelabs / monaco-collab-ext

Adds collaborative editing capabilities to the Monaco Editor
https://convergencelabs.com
MIT License
220 stars 25 forks source link

Tooltip overflow #8

Open hsestupin opened 4 years ago

hsestupin commented 4 years ago

When remote cursor is added at the last line of the editor (see red cursor at the screenshot) the tooltip is hidden: Screenshot from 2020-07-28 18-51-16

Obviously it happens only when there is not enough space at the editor bottom. But I guess the behaviour in this particular case should be the same like with a completion menu. Tooltip shouldn't be cut by the editor borders.

There is a flag IContentWidget.allowEditorOverflow which could help to resolve the problem, however I'm not sure.

mmacfadden commented 3 years ago

Sorry for the long delay. In our other editors we make the tooltip change to place above the cursor when it is near the bottom. I will take a look.

igRo commented 3 years ago

In some cases placing the tooltip above the caret won't fix the issue (you can see that remote cursor is also trimmed on the left):

Screenshot 2021-04-08 at 17 56 55

Completion works fine under the same conditions:

Screenshot 2021-04-08 at 17 57 55
mmacfadden commented 3 years ago

Yes. I think the intended behavior would be that the remote cursor moves up / down and left / right to avoid the border of the editor.