scniro / react-codemirror2

Codemirror integrated components for React
MIT License
1.66k stars 193 forks source link

inputStyle contenteditable scrolls cursor into view on mobile/android - impossible to edit #194

Open elsigh opened 4 years ago

elsigh commented 4 years ago

inputStyle: textarea on mobile makes selection impossible (you cannot select text).

inputStyle: contenteditable on mobile (with the keyboard up) scrolls the cursor into view even with autoScroll: false and autoCursor: false.

Notice that I'm trying to scroll but can't, it keeps scrolling the cursor back in. This is the demo page.

ezgif-6-4b25d3f48fc0

elsigh commented 4 years ago

I have an event listener for "scrollCursorIntoView" and it's firing every time I focus.. I've tried calling preventDefault() on it thinking that would help, but no dice so far.

elsigh commented 4 years ago

refs https://github.com/codemirror/CodeMirror/issues/6308