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

Bad auto closing jsx tag returned for if you have an unclosed element #28541

Closed
mjbvz opened this issue Nov 15, 2018 · 1 comment
Closed

Bad auto closing jsx tag returned for if you have an unclosed element #28541

mjbvz opened this issue Nov 15, 2018 · 1 comment
Labels
Domain: Completion Lists The issue relates to showing completion lists in an editor Domain: JSX/TSX Relates to the JSX parser and emitter Experience Enhancement Noncontroversial enhancements Suggestion An idea for TypeScript
Milestone

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Nov 15, 2018

TypeScript Version: 3.2.0-dev.20181114

Search Terms:

  • jsx
  • tag closing
  • tag complete
  • html

Code

  1. For the jsx:
const a = (
<footer>
    <img>
</footer>

)
  1. On the blank line, type a >

bug:
This causes VS Code to request jsx tag completions and </footer> is returned:

[Trace  - 6:31:25 PM] Sending request: jsxClosingTag (555). Response expected: yes. Current queue length: 0
Arguments: {
    "file": "/Users/matb/projects/san/x.js",
    "line": 5,
    "offset": 2
}
[Trace  - 6:31:25 PM] Response received: jsxClosingTag (555). Request took 7 ms. Success: true 
Result: {
    "newText": "</footer>",
    "caretOffset": 0
}

We may be able to handle this case better.

@weswigham weswigham added Domain: JSX/TSX Relates to the JSX parser and emitter Domain: Completion Lists The issue relates to showing completion lists in an editor Experience Enhancement Noncontroversial enhancements labels Nov 15, 2018
@RyanCavanaugh RyanCavanaugh added the Suggestion An idea for TypeScript label Mar 7, 2019
@RyanCavanaugh RyanCavanaugh added this to the Backlog milestone Aug 16, 2019
@mjbvz
Copy link
Contributor Author

mjbvz commented Oct 13, 2021

Closing as the the original case no longer seems to reproduce for me

If there are other instances where this still isn't working, please open a new issue so we can investigate

@mjbvz mjbvz closed this as completed Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Domain: Completion Lists The issue relates to showing completion lists in an editor Domain: JSX/TSX Relates to the JSX parser and emitter Experience Enhancement Noncontroversial enhancements Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

3 participants