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

Pressing . selects the first option in the context menu even before it's opened #66868

Closed
Swazimodo opened this issue Jan 21, 2019 · 8 comments
Closed
Assignees
Labels
javascript JavaScript support issues suggest IntelliSense, Auto Complete upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Milestone

Comments

@Swazimodo
Copy link

Swazimodo commented Jan 21, 2019

Issue Type: Bug

In my react app typing 'this.' will automattically type 'this.UNSAFE_componentWillMount.'. You then have to delete everything after 'this'. After this happens you can press period and you then get the context menu like it should have done initially.

autocomplete for the loss

However, this only appears to happen if you type fast. I slowed down a little while doing some further testing and it did not happen.

VS Code version: Code 1.30.2 (61122f8, 2019-01-07T22:54:13.295Z)
OS version: Windows_NT x64 6.1.7601

System Info
Item Value
CPUs Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz (8 x 3408)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Memory (System) 31.79GB (14.90GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (6)
@jrieken
Copy link
Member

jrieken commented Jan 22, 2019

This is because of the "editor.acceptSuggestionOnCommitCharacter"-setting. This is what happens

  • typing this starts suggesting and the best match is UNSAFE_componentWillMount
  • pressing ., with having the aforementioned setting, accepts that suggestion and insert the dot.

screenshot 2019-01-22 at 07 56 34

Turning the setting to false will get you out of this.

@jrieken jrieken added the *question Issue represents a question, should be posted to StackOverflow (VS Code) label Jan 22, 2019
@vscodebot
Copy link

vscodebot bot commented Jan 22, 2019

Please ask your question on StackOverflow. We have a great community over there. They have already answered thousands of questions and are happy to answer yours as well. See also our issue reporting guidelines.

Happy Coding!

@vscodebot vscodebot bot closed this as completed Jan 22, 2019
@Swazimodo
Copy link
Author

If that was the case then why does typing the same thing work if I just do it slightly slower?

@jrieken
Copy link
Member

jrieken commented Jan 22, 2019

Looks like you have the this suggestion atop then. Not sure why...

screenshot 2019-01-22 at 11 58 57

@jrieken jrieken removed the *question Issue represents a question, should be posted to StackOverflow (VS Code) label Jan 22, 2019
@jrieken jrieken reopened this Jan 22, 2019
@jrieken
Copy link
Member

jrieken commented Jan 22, 2019

Adding @mjbvz, it seems that the this suggestion disappears while typing...

@mjbvz mjbvz added the bug Issue identified by VS Code Team member as probable bug label Jan 23, 2019
@mjbvz mjbvz added this to the February 2019 milestone Jan 29, 2019
@alexch

This comment has been minimized.

@mjbvz
Copy link
Collaborator

mjbvz commented Feb 21, 2019

@Swazimodo Do you still see this problem in the latest vscode insiders builds when you fully type out this.?

I've opened microsoft/TypeScript#30012 to track why this is not suggested first when you type out thi or th, but I can't reproduce the original error in a new create-react-app project

@mjbvz mjbvz added the info-needed Issue requires more information from poster label Feb 21, 2019
@mjbvz mjbvz modified the milestones: February 2019, March 2019 Feb 24, 2019
@mjbvz
Copy link
Collaborator

mjbvz commented Mar 7, 2019

I'm closing this issue as I can't repo the issue when fully typing out this.. microsoft/TypeScript#30012 tracks the root cause of this completions not being properly sorted before you fully type out this.

@mjbvz mjbvz closed this as completed Mar 7, 2019
@mjbvz mjbvz added upstream Issue identified as 'upstream' component related (exists outside of VS Code) javascript JavaScript support issues and removed bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster labels Mar 7, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
javascript JavaScript support issues suggest IntelliSense, Auto Complete upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

4 participants