allura-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ingo" <in...@gmx.net>
Subject [allura:tickets] Re: #8260 Codemirror on mobile devices doesn't work
Date Thu, 01 Nov 2018 17:17:32 GMT
My current hack looks like that:
~~~

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;
	    }

~~~

I used that, as some scripts, like those in the ticket tool expected to
find the codemirror object.

Dave Brondsema <dave@brondsema.net> schrieb am Do., 1. Nov. 2018, 16:00:

> 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] <https://forge-allura.apache.org/p/allura/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:* nobody
>
> I 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/
>



---

** [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 03:00 PM UTC
**Owner:** nobody


I 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 dev@allura.apache.org is subscribed to https://forge-allura.apache.org/p/allura/tickets/

To unsubscribe from further messages, a project admin can change settings at https://forge-allura.apache.org/p/allura/admin/tickets/options.
 Or, if this is a mailing list, you can unsubscribe from the mailing list.
Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message