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

Cursor moves outside endqoute #139812

Closed
abdnafees opened this issue Dec 27, 2021 · 11 comments
Closed

Cursor moves outside endqoute #139812

abdnafees opened this issue Dec 27, 2021 · 11 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@abdnafees
Copy link

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.63.2
  • OS Version: Windows 10 Pro 21H2 19044.1415

Whenever I type double quotes, the cursor moves outside to the right of the end quote. It is extremely annoying. I cannot find an appropriate setting to control this behaviour either. Is there a setting to control the cursor behaviour when typing quotes?
Steps to Reproduce:

  1. Type single or double quotes in an HTML or JS file.
  2. You will notice the cursor moving after the end quote before you being to type any value.
@abdnafees abdnafees changed the title Cursor moves outside qoutes in VS Code Cursor moves outside endqoute Dec 27, 2021
@ArturoDent
Copy link

I can't reproduce this on W11, Insiders or Stable html or js files. Try running the Developer: Toggle Keyboard Shortcuts Troubleshooting and report what is output when you type a " and it jumps beyond the closing ".

@alexdima
Copy link
Member

alexdima commented Jan 6, 2022

@abdnafees Does this reproduce when disabling all extensions? Are you using a US keyboard layout? Does this reproduce in any file type?

@alexdima alexdima added the info-needed Issue requires more information from poster label Jan 6, 2022
@keithbrink
Copy link

keithbrink commented Jan 10, 2022

Screen Recording 2022-01-10 at 01 12 12 PM

This happens for me as well, here are the troubleshooting logs for keyboard shortcuts:

2022-01-10 13:12:13.507] [renderer1] [info] [KeybindingService]: / Received  keydown event - modifiers: [], code: KeyC, keyCode: 67, key: c
[2022-01-10 13:12:13.507] [renderer1] [info] [KeybindingService]: | Converted keydown event - modifiers: [], code: KeyC, keyCode: 33 ('C')
[2022-01-10 13:12:13.508] [renderer1] [info] [KeybindingService]: | Resolving [KeyC]
[2022-01-10 13:12:13.508] [renderer1] [info] [KeybindingService]: \ No keybinding entries.
[2022-01-10 13:12:13.640] [renderer1] [info] [KeybindingService]: / Received  keydown event - modifiers: [], code: KeyL, keyCode: 76, key: l
[2022-01-10 13:12:13.640] [renderer1] [info] [KeybindingService]: | Converted keydown event - modifiers: [], code: KeyL, keyCode: 42 ('L')
[2022-01-10 13:12:13.640] [renderer1] [info] [KeybindingService]: | Resolving [KeyL]
[2022-01-10 13:12:13.640] [renderer1] [info] [KeybindingService]: \ No keybinding entries.
[2022-01-10 13:12:13.756] [renderer1] [info] [KeybindingService]: / Received  keydown event - modifiers: [], code: KeyA, keyCode: 65, key: a
[2022-01-10 13:12:13.756] [renderer1] [info] [KeybindingService]: | Converted keydown event - modifiers: [], code: KeyA, keyCode: 31 ('A')
[2022-01-10 13:12:13.756] [renderer1] [info] [KeybindingService]: | Resolving [KeyA]
[2022-01-10 13:12:13.756] [renderer1] [info] [KeybindingService]: \ No keybinding entries.
[2022-01-10 13:12:13.947] [renderer1] [info] [KeybindingService]: / Received  keydown event - modifiers: [], code: KeyS, keyCode: 83, key: s
[2022-01-10 13:12:13.947] [renderer1] [info] [KeybindingService]: | Converted keydown event - modifiers: [], code: KeyS, keyCode: 49 ('S')
[2022-01-10 13:12:13.947] [renderer1] [info] [KeybindingService]: | Resolving [KeyS]
[2022-01-10 13:12:13.947] [renderer1] [info] [KeybindingService]: \ No keybinding entries.
[2022-01-10 13:12:14.043] [renderer1] [info] [KeybindingService]: / Received  keydown event - modifiers: [], code: KeyS, keyCode: 83, key: s
[2022-01-10 13:12:14.043] [renderer1] [info] [KeybindingService]: | Converted keydown event - modifiers: [], code: KeyS, keyCode: 49 ('S')
[2022-01-10 13:12:14.043] [renderer1] [info] [KeybindingService]: | Resolving [KeyS]
[2022-01-10 13:12:14.043] [renderer1] [info] [KeybindingService]: \ No keybinding entries.
[2022-01-10 13:12:14.214] [renderer1] [info] [KeybindingService]: / Received  keydown event - modifiers: [], code: Equal, keyCode: 187, key: =
[2022-01-10 13:12:14.214] [renderer1] [info] [KeybindingService]: | Converted keydown event - modifiers: [], code: Equal, keyCode: 81 ('=')
[2022-01-10 13:12:14.214] [renderer1] [info] [KeybindingService]: | Resolving [Equal]
[2022-01-10 13:12:14.215] [renderer1] [info] [KeybindingService]: \ No keybinding entries.
[2022-01-10 13:12:14.458] [renderer1] [info] [KeybindingService]: / Received  keydown event - modifiers: [shift], code: ShiftRight, keyCode: 16, key: Shift
[2022-01-10 13:12:14.458] [renderer1] [info] [KeybindingService]: | Converted keydown event - modifiers: [shift], code: ShiftRight, keyCode: 4 ('Shift')
[2022-01-10 13:12:14.458] [renderer1] [info] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase.
[2022-01-10 13:12:14.514] [renderer1] [info] [KeybindingService]: / Received  keydown event - modifiers: [shift], code: Quote, keyCode: 222, key: "
[2022-01-10 13:12:14.514] [renderer1] [info] [KeybindingService]: | Converted keydown event - modifiers: [shift], code: Quote, keyCode: 90 (''')
[2022-01-10 13:12:14.514] [renderer1] [info] [KeybindingService]: | Resolving shift+[Quote]
[2022-01-10 13:12:14.515] [renderer1] [info] [KeybindingService]: \ No keybinding entries.
[2022-01-10 13:12:14.598] [renderer1] [info] [KeybindingService]: + Ignoring single modifier shift due to it being pressed together with other keys.

This is in a .vue file with the Volar extension installed.

@keithbrink
Copy link

keithbrink commented Jan 10, 2022

May be related to this issue: vuejs/language-tools#840 - they think it's a VSCode issue.

@alexdima
Copy link
Member

alexdima commented Jan 13, 2022

Indeed, this looks to be caused by html.autoCreateQuotes. To reproduce, open a HTML file and type character-by-character (without looking at the screen):

  • <div class="asd">
  • observe that you end up with
  • <div class=""asd"></div>

I could not reproduce in 1.63.2, so it looks to be a recent change that causes this.

@alexdima alexdima added bug Issue identified by VS Code Team member as probable bug html HTML support issues and removed info-needed Issue requires more information from poster labels Jan 13, 2022
@alexdima alexdima assigned aeschli and unassigned alexdima Jan 13, 2022
@alexdima alexdima added the regression Something that used to work is now broken label Jan 13, 2022
@aeschli
Copy link
Contributor

aeschli commented Jan 14, 2022

The original issue is reported against 1.63.2 but html.autoCreateQuotes got added in 1.64. Also it's also only for html, not js.

Let's create a different issue for html.autoCreateQuotes: #140698

@aeschli aeschli assigned alexdima and unassigned aeschli Jan 14, 2022
@aeschli aeschli added info-needed Issue requires more information from poster and removed html HTML support issues labels Jan 14, 2022
@aeschli
Copy link
Contributor

aeschli commented Jan 14, 2022

@abdnafees We still need more additional information from you.
Can you confirm you are on 1.63 and you see the issue in both HTML and JS.
Can you add a screencast?

@alexdima alexdima removed bug Issue identified by VS Code Team member as probable bug regression Something that used to work is now broken labels Jan 14, 2022
@thiagoschreck
Copy link

thiagoschreck commented Feb 18, 2022

I am also having this issue. Whenever I input a quotation mark, the end quote is automatically written as expected, but the cursor goes after it instead of staying inside both quotation marks.

Version: 1.64.1 (user setup)
Commit: d6ee99e
Date: 2022-02-07T17:16:22.147Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.22000

@alexdima
Copy link
Member

@thiagoschreck Please create a new issue, as in this particular case we were surprised that the OP reported the issue against 1.63.2, which did not yet enable the html.autoCreateQuotes setting so we were wondering if it might be something else.

@thiagoschreck
Copy link

@thiagoschreck Please create a new issue, as in this particular case we were surprised that the OP reported the issue against 1.63.2, which did not yet enable the html.autoCreateQuotes setting so we were wondering if it might be something else.

I'm sorry, I've been testing again and now I am noticing that, as you mentioned, this is happening because of the html.autoCreateQuotes. So I've got nothing new to report as this ticket has already been opened.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

7 participants
@alexdima @aeschli @keithbrink @abdnafees @ArturoDent @thiagoschreck and others