Description
p5.js version
N/A - 2.0.0
What is your operating system?
Android 15
Web browser and version
Firefox Android 137.0.2 / Chrome Android 135.0.7049.100
Actual Behavior
Trying to select code on Android through long pressing and moving the handles is impossible on both browsers. Using Select All works (though it requires some finesse to hit), but copying the selection copies only the last line on Chrome (Firefox works alright, though there are ways to accidentally select line numbers too).
Doing a combined Select All and Copy operation through Thumbkey selects both the code and the line numbers on the side before copying on Firefox. (Same on Chrome copies only the last line)
Expected Behavior
I can select parts of the code freely, using the native Android selection controls, including the handles at the edges of the selection and the Select All button. When I copy some part of the code, I copy only the code, without line numbers; and I copy all the lines I've selected and not just the first/last one.
Custom keyboards like Thumbkey that include a Copy All button don't copy line numbers with the code.
Steps to reproduce
Steps:
- Create a new sketch on Android
- Select a whole word through long-pressing on it
- Try to extend the selection by dragging the handles -> Handles not shown
- Try to extend the selection by pressing the Select All button -> Can be accessed only by long-pressing the selection again.
- Try to copy a multi-line selection -> impossible on Chrome
I guess this could be termed a CodeMirror issue; however, the examples on both https://codemirror.net/5/ and https://codemirror.net/ work markedly better - allowing editing the selection through handles. The only place CodeMirror 5 fails is the Thumbkey Copy All feature under Chrome, but Select All + Copy works okay (and CodeMirror 6 does fix that). Hence, opening the issue here, in case the web editor is doing something funny too (: