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

Emmet suggests tags when trying to add attributes when there is no closing tag #35128

Closed
ghost opened this issue Sep 26, 2017 · 7 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug emmet Emmet related issues verified Verification succeeded
Milestone

Comments

@ghost
Copy link

ghost commented Sep 26, 2017

  • VSCode Version: 1.16.1 c[ 27492b6 ]
  • OS Version: Windows 8.1 64-bit

Steps to Reproduce:

  1. said <img sr

Result:

<img <source>

What should it do?

suggestion <img src=""> (also tooltip).

screenshot_68
screenshot_70

Reproduces without extensions: Yes

@aeschli
Copy link
Contributor

aeschli commented Sep 28, 2017

@ramya-rao-a Any chance you can filter 'src' at this location? The location is inside a tag and shouldn't be proposed.

@ramya-rao-a
Copy link
Contributor

If the img tag were closed then this doesnt happen. The parser I am using identifies the cursor position to be inside the open tag and emmet will not suggest anything.

But here, the opening tag for img is not closed. And so the parser doesnt identify it as a node..

@ramya-rao-a ramya-rao-a added bug Issue identified by VS Code Team member as probable bug emmet Emmet related issues labels Sep 28, 2017
@ramya-rao-a ramya-rao-a added this to the October 2017 milestone Sep 28, 2017
@ramya-rao-a ramya-rao-a changed the title [BUG] html suggestion "src" → "<source>" Emmet suggests elements when trying to add attributes Sep 28, 2017
@ramya-rao-a ramya-rao-a changed the title Emmet suggests elements when trying to add attributes Emmet suggests tags when trying to add attributes Sep 28, 2017
@ramya-rao-a ramya-rao-a changed the title Emmet suggests tags when trying to add attributes Emmet suggests tags when trying to add attributes when there is no closing tag Oct 31, 2017
@obedm503
Copy link

also facing this issue. it's gets pretty annoying after a while. also happens when typing inside an attribute's value and isn't limited to img tags

@ramya-rao-a
Copy link
Contributor

I have pushed a fix for this.
Please give the Insiders build for Dec 4th 2017 a try.

@ramya-rao-a
Copy link
Contributor

Note to verifier:

  • Test both the Emmet: Expand Abbreviation command and the emmet completions
  • Apart from the case here (Open tag not closed yet), try from all other possible locations in an html file. Inside open tag, in between open and close tag, after attributes etc.

@octref
Copy link
Contributor

octref commented Dec 6, 2017

@ramya-rao-a Does not seem to handle it at outermost position:

image

@ramya-rao-a
Copy link
Contributor

Good catch @octref
Fixed with a1b377e

@RMacfarlane RMacfarlane added the verified Verification succeeded label Dec 7, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug emmet Emmet related issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants