Skip to content

Bug: Playground clears portions of text when attempting to type #6336

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

Closed
4 tasks done
lostfictions opened this issue Jan 13, 2023 · 1 comment · Fixed by #6513
Closed
4 tasks done

Bug: Playground clears portions of text when attempting to type #6336

lostfictions opened this issue Jan 13, 2023 · 1 comment · Fixed by #6513
Labels
accepting prs Go ahead, send a pull request that resolves this issue bug Something isn't working package: website Issues related to the @typescript-eslint website website: playground

Comments

@lostfictions
Copy link

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have searched for related issues and found none that matched my issue.
  • I have read the FAQ and my problem is not listed.

Relevant Package

website

Playground Link

https://typescript-eslint.io/play

Repro Code

1. Visit https://typescript-eslint.io/play.
2. Begin to type in the editor. For example, I started to type `type A = { }`.
3. Portions of the text will disappear as I type. For example, after attempting to type the above, the editor seemed to delete the start of the line, and showed only `{ }`. On another attempt to type the same thing, the editor deleted everything.

ESLint Config

N/A

tsconfig

N/A

Expected Result

The playground editor should not delete or modify input.

Actual Result

The playground editor cannot be used for entering text.

Additional Info

Sorry to file this immediately after #6335 -- I'm not sure if it's related, or if the situation is simply much worse than I at first noticed. The playground seems pretty much unusable in this state -- I thought it would be an easy way to create a minimal repro for a rule false positive, but it's making things much more difficult.

Here's a video showing the issue. After a few moments the playground deletes the entire contents of the editor. On other attempts, different parts of the code were erased for me -- once I was left with just { }, another time I had type = ...

output.mp4

Versions

Chrome 108

@lostfictions lostfictions added bug Something isn't working triage Waiting for team members to take a look labels Jan 13, 2023
@bradzacher bradzacher added accepting prs Go ahead, send a pull request that resolves this issue package: website Issues related to the @typescript-eslint website website: playground and removed triage Waiting for team members to take a look labels Jan 19, 2023
@armano2
Copy link
Collaborator

armano2 commented Feb 20, 2023

note: root cause is related to synchronization between URL and text editor
https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/website/src/components/hooks/useHashState.ts

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepting prs Go ahead, send a pull request that resolves this issue bug Something isn't working package: website Issues related to the @typescript-eslint website website: playground
Projects
None yet
3 participants