Make inputStyle an option, move relevant logic into TextareaInput
Add a dummy ContentEditableInput
Wire up some actual logic to ContentEditableInput
Simple things work.
Override tap events to avoid Chrome's magnifying behavior
It apparently believes that if the editor's nodes are directly next to each other without margin, the user needs a magnifying glass to pick a cursor position.
Style in-editor selections to match default selection style
So that the contenteditable input style doesn't look silly on desktop.
Force redraw of native selection when it is in a bogus state
I.e. when the cursor is directly in the editor's top node or outside of a line's <pre> node.
Don't immediately focus on click in IE
It can create a kind of phantom-focus state where the textarea is focused but you can't type into it. Issue #3041
When polling input, set prevInput before ending the operation
Since that might end up calling resetInput and creating an inconsistent state. Issue #3046
Fix for copying large chunks of text
Selecting and copying a large chunk of text places a single dash into clipboard. This is related to line 1285, where the input's content is trimmed for performance: https://github.com/codemirror/CodeMirror/blob/mobile/lib/codemirror.js#L1285 minimal = hasCopyEvent && (range.to().line - range.from().line > 100 || (selected = cm.getSelection()).length > 1000); var content = minimal ? "-" : selected || cm.getSelection(); The problem is apparently a typo during refactoring/renaming from 'd' on the master branch to 'input' here.
Don't try to use contenteditable=plaintext-only
Since Mobile Chrome's clipboard API is broken and does not let us intercept paste events, we need full contenteditable to be able to paste code with newlines. Issue #3062
Handle double- and triple-tap events ourselves
Since preventDefaulting the first touchend event means the native behavior won't happen anymore, this is seems to be the only way to make multi-tap work for iOS.
[contenteditable input] Only return true from pollContent when an act…
…ual change was found So that styling content causes a redraw, removing the style
[contenteditable input] Fix another bug in pollContent
Typing the same character multiple times in a row would cause a character to be deleted.
[contenteditable input] Fix selection-to-pos hack when node is a span…
… around a text node