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

HTML Snippets Combine #32211

Closed
svictoreq opened this issue Aug 10, 2017 · 3 comments
Closed

HTML Snippets Combine #32211

svictoreq opened this issue Aug 10, 2017 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug snippets verified Verification succeeded
Milestone

Comments

@svictoreq
Copy link

  • VSCode Version: Code 1.14.2 (cb82feb, 2017-07-19T23:34:09.706Z)
  • OS Version: Windows_NT ia32 10.0.15063
  • Extensions:
Extension Author (truncated) Version
Bookmarks ale 0.15.2
vscode-color ans 0.4.5
theme-verdandi be5 1.5.0
color-info bie 0.5.0
path-intellisense chr 1.4.2
vscode-eslint dba 1.2.11
vsc-material-theme Equ 1.0.2
beautify Hoo 1.1.1
vscode-gutter-preview kis 0.10.0
HTMLHint mka 0.3.3
color-highlight nau 2.3.0
material-icon-theme PKi 2.1.0
vscode-icons rob 7.12.0
code-settings-sync Sha 2.8.2
stylelint shi 0.28.0
ayu tea 0.4.0

(16 theme extensions excluded)


Steps to Reproduce:

  1. Create an HTML document.
  2. Use the '!' emmet snippet to create a boilerplate.
  3. In the body section create a form element and enter key.
  4. Insert an input snippet.
  5. Tab to edit the type attribute.
  6. Edits the attribute and outer element.

html_form_bug

Expected behaviour: edit only the attribute and keep using tab inside the snippet.

Reproduces without extensions: Yes

@ramya-rao-a ramya-rao-a added the bug Issue identified by VS Code Team member as probable bug label Aug 10, 2017
@ramya-rao-a ramya-rao-a added this to the August 2017 milestone Aug 10, 2017
@ramya-rao-a
Copy link
Contributor

Also repros without the form element

  • Type ! and select the suggested emmet expansion
  • Tab till you reach the body
  • type input and select the suggested emmet expansion (this expands to <input type="${2:text}">"
  • Start typing to edit the type attribute, typed text appears at the end as well

@jrieken An extra cursor is being placed at the end causing the edits to the placeholder appear in 2 places. Must be due to nested snippets?

Doesn't happen if you escape snippet mode after the first snippet gets expanded

@jrieken
Copy link
Member

jrieken commented Aug 21, 2017

@jrieken An extra cursor is being placed at the end causing the edits to the placeholder appear in 2 places. Must be due to nested snippets?

Yeah, must be the merging of snippets... I'll take a look

@jrieken jrieken self-assigned this Aug 21, 2017
@jrieken
Copy link
Member

jrieken commented Aug 21, 2017

Ok, I can reproduce, both placeholders (of the nested snippet) get the same id assigned. We insert <input type="${2:text}"> at placeholder 8 which is implemented as merging the second placeholder into the original snippet as 8.2. However, the final placeholder is getting the same index because it assumes the indices of placeholders start counting at 1 and don't skip a number...

@mjbvz mjbvz added the verified Verification succeeded label Aug 31, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
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 snippets verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants