p5.js-web-editor icon indicating copy to clipboard operation
p5.js-web-editor copied to clipboard

(Mobile Editor) Backspace does not remove empty lines in the Editor; it closes the keyboard.

Open ItsMeWillyV opened this issue 2 years ago • 3 comments

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

  1. Open the Editor (on Android)
  2. Make a new line
  3. Remove everything in the line, and then press Backspace again when it is empty.

ItsMeWillyV avatar Oct 23 '23 14:10 ItsMeWillyV

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.

welcome[bot] avatar Oct 23 '23 14:10 welcome[bot]

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?

lindapaiste avatar Oct 24 '23 14:10 lindapaiste

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

aryanas159 avatar Dec 16 '23 14:12 aryanas159