Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocompletion popup is not displayed if the start of the completion range is not visible #1422

Open
mtomaschek opened this issue Aug 8, 2024 · 1 comment

Comments

@mtomaschek
Copy link

mtomaschek commented Aug 8, 2024

Describe the issue

If the start of the completion range is not visible, e.g. because of scrolling, the autocompletion popup does not display at all. This seems to be a consequence of how the position for the tooltip is selected (start of the completion range), because tooltips for currently not visible positions are not displayed.

This can be reproduced using the autocompletion demo on the main website:
autocomplete-issue
As soon as the first character of the completion range goes outside the bounds of the editor, the popup does not appear any more. It does appear while the first character is behind the line numbers, though.

Personally, I would prefer the popup to either always be aligned to the cursor, or to be kept visible as long as a part of the completion range is still visible.
As the current behavior seems to be by design, do you think this is something that should be fixed, or something that could be allowed to be adjusted in a future version (e.g. via some configuration option controlling where to place the popup)?
Would a pull request for this be welcome?

Browser and platform

Tested in Firefox 128 and Chrome 127, but should be unrelated to the browser

Reproduction link

https://codemirror.net/examples/autocompletion/

@marijnh
Copy link
Member

marijnh commented Aug 8, 2024

Could you say a bit more about when it would be useful to show a tooltip for a position that's not visible to the user?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants