-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
suggestion menu should not automatically select the first suggestion #67698
Comments
(Experimental duplicate detection) |
I disagree with that. Selecting the best match is good and forcing people to down arrow slows down everything. |
@jrieken You are free to disagree, but please respect my experience and observations. The current behavior is observably, empirically confusing and flow-breaking for a majority of my students, as well as many bug-reporters and SO-question-askers. If you want to speed things back up (and risk the insertion of bogus code which you might then need to break your train of thought to correct), then you should be free to toggle the aggressive autoselection back on. By default, a suggestion should be just that: a suggestion, not a decision. |
It sounds like the root problem is that commit characters are sometimes unreliable for js. Typing the same sequence of characters should theoretically always result in the same text being inserted. Disabling commit characters makes the behavior more repeatable. When typing |
Not sure if there's anything we can do about this since we don't want
suggestions to block typing
I was with you up to this point. Suggestions dont block typing; instantly
selecting the first suggestion does -- or at least it sets it up so the
next "commit character" inserts characters that the typist does not intend.
My proposed solution is to bring up the suggestion menu exactly as it is now, but to **not** select any item in the menu until the user actively presses the down arrow key (or moves the mouse cursor over it).
This is how most GUI menus work, including menu bar menus and right-click popup context menus.
It sounds like the root problem is that commit characters are sometimes
unreliable for js.
I think the commit characters are probably reliable once the suggestion
popup appears, but the timing of that popup is variable (based on individual
typing rate and various other sources of lag), which makes typing
unreliable.
|
/duplicate of #33725 |
Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines. Happy Coding! |
VS Code version: Code 1.30.2 (61122f8, 2019-01-07T22:48:31.260Z)
OS version: Darwin x64 17.7.0
System Info
checker_imaging: disabled_off
flash_3d: unavailable_software
flash_stage3d: unavailable_software
flash_stage3d_baseline: unavailable_software
gpu_compositing: unavailable_software
multiple_raster_threads: unavailable_off
native_gpu_memory_buffers: unavailable_software
rasterization: unavailable_software
video_decode: unavailable_software
video_encode: unavailable_software
webgl: unavailable_off
webgl2: unavailable_off
Extensions (3)
Steps to Reproduce:
cy.get(
at a rate sufficient for the suggestion menu to appearcrypto.getRandomValues(
appears insteadDoes this issue occur when all extensions are disabled?: Yes
In JavaScript, when I type cy.get( and then look at the screen I should see
cy.get(
. Instead I (sometimes!) seecrypto.getRandomValues(
instead.This is an #a11y issue; the suggestion menu should not select or fill anything until/unless I press ↓ while it's up. Any setting that takes control away from the user and types extra characters that they did not intend is a bad default setting, and the fact that this behavior is timing-dependent is even more maddening.
I note that similar bugs have been reported before and not fixed. Please reconsider. I teach programming classes and in every class so far, the majority of students find this behavior astonishing and frustrating; power users who prefer it should be competent enough to change a setting to their preference, but (I repeat) the default behavior of a text editor should be to faithfully enter the keys that were typed.
A common answer to this problem is to disable the
acceptSuggestionOnCommitCharacter
and/oracceptSuggestionOnEnter
settings, but this bug is really about the default values of those settings being wrong for most users.Also, the
editor.acceptSuggestionOnCommitCharacter
setting sounds like it's intended to type the selected suggestion and a dot when I press ↓., which is actually desirable behavior; the advice to disableeditor.acceptSuggestionOnCommitCharacter
is more of a workaround than a solution since it disables .-to-accept in all cases, not just this overly-aggressive autocomplete scenario.Is this issue sufficient to track both the fact that this setting is wrong by default, and that you might need a new setting e.g. "automaticallySelectFirstSuggestion" (which should also be false by default)?
Related issues:
next(
VS Code will replace it withINSPECT_MAX_BYTES(
#41641The text was updated successfully, but these errors were encountered: