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

When typing "too fast", HTML element completions are omitted #9725

Open
Tracked by #9807
Peter-Juhasz opened this issue Dec 17, 2023 · 4 comments
Open
Tracked by #9807

When typing "too fast", HTML element completions are omitted #9725

Peter-Juhasz opened this issue Dec 17, 2023 · 4 comments
Assignees

Comments

@Peter-Juhasz
Copy link

Version: 17.9.0 P2

You can see my 3 attempts of typing <form in the recording:

  1. Successful, both HTML and Razor completions are present
  2. Successful, both HTML and Razor completions are present
  3. Failed, only Razor completions are present and missing all HTML completions
Rogzites.2023-12-17.113440.mp4

Note that even after slowing down typing, HTML completions do not appear anymore in this completion session.

I encounter this issue all the time while developing Blazor. Look at this, I'm trying to simply open a <dl> tag, but if I don't spell it slowly, I get the wrong completion:

Rogzites.2023-12-17.113929.mp4
@ghost ghost added the untriaged label Dec 17, 2023
@Peter-Juhasz
Copy link
Author

Razor Logger Output:

11:45:22.325 We are behind the C# version which is surprising. Could be an old request that wasn't cancelled, but if not, expect most future requests to fail. We were wanting 383 but C# is at 387.

@Dean-NC
Copy link

Dean-NC commented Jun 13, 2024

The issue of typing a HTML tag fast, and pressing tab to accept the 1st intellisense item, and getting the wrong tag put in happens regularly for me in .cshtml files. It's so annoying. After it happens, most of the time it won't repeat the problem for that same tag at that same editor location, meaning it works after erasing it and re-typing/tabbing. But sometimes after it happens and I erase and slowly re-do it, I can see that intellisense doesn't have that item in the list, and I have to type the full thing without being able to press tab.

This happens even more regularly for HTML attributes. For example, I have a div tag and I type sty then press tab, and style isn't in the intellisense list, so it puts the 1st one it has into the code which is something other than style. Erasing then slowly typing sty will usually work fine.

I'm almost certain, but not 100% sure, it happens when the preview feature HTML LSP-based Editor is both enabled and disabled.

@davidwengier
Copy link
Member

Reported here too: https://www.reddit.com/r/Blazor/s/g61LU8V68q

@Buildstarted
Copy link

Quite often when I'm editing a .cshtml file I routinely get elements I'm typing overwritten by a completely unrelated element when I press space. @davidwengier was kind enough to point me to a temporary solution by disabling auto complete after space. However, this is not a real solution to the issue.

This particular issue seems like it's probably related. Here is an example of me typing <a and seeing the unrelated elements in the select list. Of course when I press space it gets replaced with <cache.

Image

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

6 participants