question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect cursor position after css autocomplete

See original GitHub issue

Describe the bug (including copyable syntax) CSS autocomplete cursor position af The cursor is right before the last character of the last word.

Screenshot justify-conten/*the cursor is currently here*/t: ; Screen Shot 2022-03-04 at 10 46 30 AM

To Reproduce Add any css property, then hit enter on any suggestions. Screen Shot 2022-03-04 at 10 52 14 AM

Expected behavior The cursor should be BETWEEN the colon and the semi colon

display: /*the cursor should be here*/ ;

Build environment (please complete the following information):

  • OS: Mac OS Catalina 10.15.7
  • VSCode Version: 1.65
  • Extension Version 1.72

Additional context This bug only appeared after I updated vscode to 1.65

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:13
  • Comments:15 (1 by maintainers)

github_iconTop GitHub Comments

18reactions
urkin-devcommented, Mar 13, 2022

For me the problem was in vscode-styled-components extension but from another author, not Styled Components. So check your extension and remove all wrong ones if you have them and install “vscode-styled-components” from Styled Components

15reactions
TheThomasYcommented, Mar 11, 2022

For me the update did nothing to fix the issue. However removing a conflicting vscode-styled-components extension did. So double check you have the correct VS Code extension installed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

VS Code cursor in wrong position after tab - Stack Overflow
When I write some code, and then click Tab to autofill from context menu the cursor is now in the wrong ...
Read more >
ST4 bad cursor placement after auto completing a CSS property
Since ST4, I noticed that the cursor stays before the ; when I auto complete a CSS property. I have to type right...
Read more >
IntelliSense in Visual Studio Code
Learn about Visual Studio Code IntelliSense (intelligent code completion). ... that appear closer to the cursor position, using the editor.suggest.
Read more >
invalid - CSS: Cascading Style Sheets - MDN Web Docs
The :invalid CSS pseudo-class represents any , , or other element whose contents fail to validate.
Read more >
Changelog - CodeMirror
Fix an issue where widget buffers could be incorrectly omitted after empty lines. ... Fix a regression in cursor position determination after making...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found