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

jumpToNextSnippetPlaceholder on Enter unexpected behaviour #343

Closed
ladusee opened this issue Apr 16, 2024 · 4 comments
Closed

jumpToNextSnippetPlaceholder on Enter unexpected behaviour #343

ladusee opened this issue Apr 16, 2024 · 4 comments
Assignees
Labels
Milestone

Comments

@ladusee
Copy link

ladusee commented Apr 16, 2024

This keybinding recently started to interfere with basic editor behavior.

Command: jumpToNextSnippetPlaceholder
Keybinding: Enter
When: editorTextFocus && hasNextTabstop && inSnippetMode
Source: IntelliJ IDEA Keybindings

This gets triggered when accepting suggestion/autocomplete in some cases - instead of accepting selected suggestion cursor jumps outside of brackets.
Caught it in JSX/TSX syntax when working with attributes/props.

Removing this keybinding fixed the issue.

Steps to reproduce:

  1. create an HTML div element in js/ts/jsx/tsx file
  2. add style attribute. When editor suggests style - select it
<div style={~cursor is here after accepting suggestion~} />
  1. press Enter

Expected result:

<div style={
     ~cursor is here~
} />

Actual result (cursor jumped outside of brackets):

<div style={}~cursor is here~ />

This issue is not JSX-specific, happened in regular JS/TS as well. Seems to be related to When keybinding instructions and should be reproducible in other languages.

@lgou2w
Copy link

lgou2w commented Apr 18, 2024

I'm having the same problem with the Rust language.

Pressing Enter when suggestion/autocomplete is in focus causes completion to fail!

focus

failed

@baveku
Copy link

baveku commented Apr 18, 2024

remove keybinding jumpToNextSnippetPlaceholder and it's worked.
I have been trying for 2 weeks to find the problem; :| I'm a noop. right?

@kasecato kasecato self-assigned this Apr 20, 2024
@kasecato
Copy link
Owner

Related with #239 since v1.6.1

@kasecato kasecato added the bug label Apr 20, 2024
@kasecato kasecato added this to the v1.7.1 milestone Apr 20, 2024
kasecato added a commit that referenced this issue Apr 20, 2024
Fixed #343 that jumpToNextSnippetPlaceholder on Enter unexpected beha…
@kasecato
Copy link
Owner

kasecato commented Apr 20, 2024

Thanks for your detailed reporting, I just fixed and released it as v1.7.1. Please check it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants