-
Notifications
You must be signed in to change notification settings - Fork 36.7k
Description
VS Code version: Code 1.30.2 (61122f8, 2019-01-07T22:48:31.260Z)
OS version: Darwin x64 17.7.0
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i7-2677M CPU @ 1.80GHz (4 x 1800) |
| GPU Status | 2d_canvas: unavailable_software 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 |
| Load (avg) | 2, 3, 3 |
| Memory (System) | 4.00GB (0.04GB free) |
| Process Argv | . |
| Screen Reader | no |
| VM | 0% |
Extensions (3)
| Extension | Author (truncated) | Version |
|---|---|---|
| vscode-eslint | dba | 1.8.0 |
| dotenv | mik | 1.0.1 |
| vsliveshare | ms- | 0.3.1151 |
Steps to Reproduce:
- open a JS file
- type
cy.get(at a rate sufficient for the suggestion menu to appear - notice that
crypto.getRandomValues(appears instead
Does 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!) see crypto.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/or acceptSuggestionOnEnter 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 disable editor.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:
- Every time I type
next(VS Code will replace it withINSPECT_MAX_BYTES(#41641 - Pressing . selects the first option in the context menu even before it's opened #66868
- [Accessibility]A11y_VSCode_Editor_Keyboard: On tab keypress, the first item of suggestion automatically gets selected. #52444
- https://twitter.com/joshwcomeau/status/1035947291813720064
- https://stackoverflow.com/questions/51199397/vscode-editor-accepting-suggestions-on-typing-parenthesis
- https://www.reddit.com/r/vscode/comments/7acy1y/disable_period_autocompleting_intellisense/