Skip to content

Issue with using Tab or Enter when performing short hand code (not for sure if short hand is the way to put it but it works) #11719

Closed

Description

  • VSCode Version: Code 1.5.0 (4fc690b, 2016-09-08T09:09:27.395Z)
  • OS Version: Windows_NT ia32 10.0.10586

Steps to Reproduce:

  1. Type Table and hit tab
  2. Type tr and hit tab

What used to happen is the cursor would be placed in between the tr tags <tr>cursor would be here</tr> after hitting the tab key on a tr or td tag. Since the last update, it now goes to the end of the line which isn't too aggravating if you have just the tr and nothing else. It become aggravating when you have something like this:

<td><input type="text" name="something" id="something" value="something"></td>

Let's say you forgot to change or want to add some styles to the td tag.

Steps to Reproduce:

  1. Go into the td tag and hit space just after the 'd' in 'td'
  2. Type 'style' and hit tab

Instead of placing the cursor inside the style tag style="cursor goes here", you end up with:

<td style=""><input type="text" name="something" id="something" value="something"></td>CURSOR IS WAY OVER HERE

Activity

  1. pzmosquito commented on Sep 8, 2016

    @pzmosquito

    I have the same issue, with Code 1.5.0 on OS X 10.11.6
    cursor goes to the end of the line when auto completes HTML attribute

  2. ramya-rao-a commented on Sep 8, 2016

    @ramya-rao-a
    Contributor

    Brandon Rice (@BrandonRice) I can see cursor going to end of line when auto completing the HTML attribute but not the tag.
    i.e
    Type table and hit TAB -> cursor is in between the starting and closing tag (as expected)
    Type an attribute like your style example and hit TAB -> cursor is goes to end of line instead of staying inside the quotes so that user can provide value for the attribute

    Can you confirm?

  3. ramya-rao-a commented on Sep 8, 2016

    @ramya-rao-a
    Contributor
  4. mrmlnc commented on Sep 9, 2016

    @mrmlnc
    Contributor

    Ramya Rao (@ramya-rao-a), nope, it's not Emmet. This is related to snippetController.ts after a6d74ab by Johannes Rieken (@jrieken).

    Works fine before 3e87ace and broken after 5fbe501.

  5. jrieken commented on Sep 9, 2016

    @jrieken
    Contributor

    Martin Aeschlimann (@aeschli) will know. Denis Malinochkin (@mrmlnc) Is this with multiple cursors?

  6. mrmlnc commented on Sep 9, 2016

    @mrmlnc
    Contributor
  7. ITSecMedia commented on Sep 9, 2016

    @ITSecMedia

    Definitely a new issue with shortcode cursor positioning.
    The cursor position is wrong on every use.
    Happens here since the last update to V1.5 and 1.5.1

  8. jrieken commented on Sep 9, 2016

    @jrieken
    Contributor

    Ack - the is a regression. Closing this as a duplicate of #11742 because it contains already more info

  9. added
    *duplicate
    and removed
    html
    on Sep 9, 2016
  10. locked and limited conversation to collaborators on Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

*duplicatesnippets

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions