class cmdummy{constructor(ref) {this.ref = ref;}getValue(){return this.ref.value;}setValue(val){this.ref.value = val;}refresh(){}focus(){this.ref.focus();}}......var mobile = (typeof window.orientation !== "undefined") || (navigator.userAgent.indexOf('IEMobile') !== -1);if (mobile){$textarea[0].classList.add("CodeMirror");$textarea[0].CodeMirror = new cmdummy($textarea[0]);return;}
Yea I've noticed that too, super annoying. Sometimes it worked for me though, so at the time I wasn't able to get a good idea of what the problem was.
We should try upgrading SimpleMDE (a layer on top of CodeMirror). It hasn't been updated for a while, but there is a fork at https://github.com/Inscryb/inscryb-markdown-editor We could also try updating just the CodeMirror part (that might require doing a simplemde build ourselves, I think I did that in the past).
Looking at CodeMirror bug reports, I've found https://github.com/codemirror/CodeMirror/issues/5245 which seems to describe the problem, and is still an open issue.
So might be best to detect the browser somehow (that is always tricky) and do a plain textarea. It'd be unfortunate to lose the toolbar and syntax highlighting, but better than typing not working.
[tickets:#8260] Codemirror on mobile devices doesn't work
Status: open
Milestone: unreleased
Created: Thu Nov 01, 2018 06:07 AM UTC by Ingo
Last Updated: Thu Nov 01, 2018 06:07 AM UTC
Owner: nobodyI love to write documentation on my Smart phone on the run. Currently this is not possible with Codemirror, as it doesn't handle a mobile Keyboard correctly.
- spaces are not handled or doubled
- some words are magically duplicated sonstiges,...
This affect all tools, as codemirror is widely used. Even this ticket is written in google keep and copied to the ticket ;)
A possibility to disable codemirror, or an automatic fallback to a plain textarea would be great. I personally don't use the toolbar at all, so I wouldn't miss that feature.
Sent from forge-allura.apache.org because you indicated interest in https://forge-allura.apache.org/p/allura/tickets/8260/
To unsubscribe from further messages, please visit https://forge-allura.apache.org/auth/subscriptions/