Skip to content

in jsx/tsx, auto closing quotes not happen when cursor is at end of self closing tag. #41964

@heroboy

Description

@heroboy

TypeScript Version: 4.1.2

Search Terms: auto closing quotes jsx tsx

Code

<Table size=|/>

In vscode, place the cursor at | , input '

vscode setting should be "editor.autoClosingQuotes": "languageDefined"
when the setting is "always", it close the quotes. So maybe this is typescript issue.

This is not happened when code is

<Table size=|         />

Expected behavior:
<Table size=''/>

Actual behavior:
<Table size='/>

Playground Link: playground doesn't close quote in tag attribute.

Related Issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptHelp WantedYou can do thisPursuitFellowshipHelp wanted from Pursuit fellowship; others please avoid until Dec 19

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions