Codimd: Controlling the cursor buggy in iOS

Created on 18 Apr 2019  Â·  5Comments  Â·  Source: hackmdio/codimd

On iOS (Safari, Chrome, Firefox), the cursor behaves unreliably, on iPad the standard two-finger gesture on the keyboard can’t place the cursor, the writing area jumps unexpectedly, the keyboard sometimes doesn’t open. See this scree recording: http://ak-u.de/yd

What you see there: writing, trying to move the cursor with two-finger gestures (visible when letters disappear from keyboard).

After that:

  • visible pad area jumps unexpectedly,
  • keyboard doesn’t appear reliably

→ Unfortunately, this comes down to HackMD/CodiMD not being fully usable on iOS.

Affected browsers

  • Safari/iOS
  • Chrome/iOS
  • Firefox/iOS

Any ideas?

All 5 comments

Having similar issues controlling the CodeMD cursor on an iPad using an external bluetooth keyboard.

From the keyboard, the arrow keys do not move the cursor, which also means that text selection is not possible.

However, the CodeMirror editor does support iOS, both using the touchscreen and with an external keyboard.

Hi @JJ-OpusVL
I think CodeMirror still have problem supporting iOS external keyboard, you can find out bunch of issues here:
https://github.com/codemirror/CodeMirror/search?p=1&q=ios+is%3Aissue&type=Issues
https://github.com/codemirror/CodeMirror/search?q=ipad+is%3Aissue&type=Issues

Could you share any test with us?

Here's a basic test using an external keyboard with CodeMirror 5.46.0 - https://jsfiddle.net/5a4cqbzg/9/

Browser is Safari on iOS 12.1

Working

  • Arrow keys
  • Text selection with shift + arrow keys
  • Cut (Cmd-X)
  • Copy (Cmd-C)
  • Paste (Cmd-V)

Not working

  • Select all (Cmd-A)

None of these key presses work on the current CodiMD.

I've also tested the patch from https://github.com/codemirror/CodeMirror/issues/5073 that fixes "Select All" on the iPad internal keyboard (CSS addition) and confirmed that it works - https://jsfiddle.net/L1gbpfoa/

There is an option called "inputStyle" in CodeMirror and we use "textarea" which is bad for supporting iOS but have better IME input experience.

The default of inputStyle on mobile now is contenteditable which is the mode you're testing: https://github.com/codemirror/CodeMirror/blob/c18094eab567211f73050beaa5c3fcceb2133888/src/edit/options.js#L77

Seems we need to do more investigation to find out the solution to make both IME and external keyboard work.

Thank you for reporting and sharing information with us @JJ-OpusVL

The keyboard arrow behaviors fixes have been confirmed on iOS 13, please upgrade to iOS 13.
Close this now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Nebukadneza picture Nebukadneza  Â·  3Comments

ccoenen picture ccoenen  Â·  4Comments

ghost picture ghost  Â·  4Comments

mxmo0rhuhn picture mxmo0rhuhn  Â·  3Comments

farleylai picture farleylai  Â·  5Comments