Skip to content

Autocomplete removes last quote of html attribute #2146

Open
@ejohnson-dotnet

Description

@ejohnson-dotnet

🐞 bug report

Is this a regression?

Not sure

Description

Using autocomplete with only this extension enabled eliminates the last quote of an HTML attribute.

Bug Type

What does this bug affect

  • Angular Language Service VSCode extension
  • Angular Language Service server

Reproduction

Steps to reproduce the behavior:

  1. Open an HTML file with some tags in it, for example <ul></ul>
  2. Inside the beginning tag after ul, type a space then type class=
  3. It will automatically enter two double quotes after the equal sign and the cursor will be in the middle of the two.
  4. Type in one more character like d then use the up/down arrow keys to select an autocompletion suggestion, then press [tab] to accept the autocompletion.

Many times, but not always the output will be <ul class="dropdown></ul> without an ending double quote character for the attribute.

If you disable this extension it always results in this <ul class="dropdown"></ul> with the double quote at then end.

Expected behavior

It should not delete the last double quote.

Logs

Log file gives us deep insight into the behavior and performance of the extension. If the issue is a performance
problem or an error occured, please provide the output of the log file below.

Set Angular Log level to verbose.





Screenshots

If applicable, add screenshots to help explain your problem.

Example Screenshot

🌍 Your Environment

Angular Version:




Angular CLI: 18.2.0
Node: 20.11.1
Package Manager: npm 10.2.4
OS: win32 x64

Extension Version:




v19.1.0

VSCode Version:




Version: 1.97.2

Operating System:




Windows 11 Pro 24H2

Extension options:





Anything else relevant?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions