p5.js-web-editor
p5.js-web-editor copied to clipboard
(Mobile Editor) Backspace does not remove empty lines in the Editor; it closes the keyboard.
p5.js version
1.7.0
What is your operating system?
Android
Web browser and version
Chrome V118.0.5993.80
Actual Behavior
The keyboard is closed when pressing Backspace while on an empty line.
Expected Behavior
The empty line is removed.
Steps to reproduce
- Open the Editor (on Android)
- Make a new line
- Remove everything in the line, and then press Backspace again when it is empty.
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.
I'm glad that we have the mobile editor out in production so that we can find issues like this! Unfortunately I imagine this one will be a real pain to solve. There is nothing in our code that controls whether the keyboard is open or not, so I'm not sure how we can change the behavior. Maybe look into whether this is issue that other people have encountered with CodeMirror v5?
Code Mirror also encountered this issue, turns out it's a pretty complicated issue. https://github.com/codemirror/view/commit/c1fcccdd525619c6b4c9fc16c3d372da65f6c653 This is how they fixed it, gotta look into it