~sircmpwn/builds.sr.ht#265: 
Switch to CodeMirror for editing manifests

Ace, the current code editor, doesn't work well on iOS browsers since the hacks that it uses to display to the user don't act like the normal textfields. Based on discussion on IRC, we want to try using CodeMirror (https://codemirror.net), since it should be equal on desktop browsers and better on iOS.

Status
RESOLVED FIXED
Submitter
~gbear605
Assigned to
No-one
Submitted
4 years ago
Updated
4 years ago
Labels
No labels applied.

~sircmpwn REPORTED FIXED 4 years ago

~gbear605 4 years ago

Can confirm that it works much better now. Thanks so much! :)

~smallick 4 years ago

Sorry. The current editor does not work on my browser. Maybe my browser is too old.

The previous "editor" gave me a plain textbox, but the current one gives me nothing. Plain empty! At least a plain textbox would be appreciated.

Opening browser console tells me that CodeMirror's code uses ES6 but my browser supports upto ES5.1...

~smallick 4 years ago

Hmm. Found the problem.

/* Reduce effects of FOUC for JS users */
document.getElementById('editor').display = 'none';

Then, down below, the CM is initialized. Because my browser does not work for ES6, thats fine and CM does not work well in my browser as well, so need for that to me.

I use an old browser on an currently outdated platform (a J2ME feature phone).

~smallick 4 years ago

Hmm. Found the problem.

/* Reduce effects of FOUC for JS users */
document.getElementById('editor').display = 'none';

Then, down below, the CM is initialized. Because my browser does not work for ES6, thats fine and CM does not work well in my browser as well, so need for that to me.

I use an old browser on an currently outdated platform (a J2ME feature phone).

~smallick 4 years ago

Auch. Double posting. Forgive me. I also have a pretty bad (2G) internet connection.

~smallick 4 years ago

Solution that works for me:

(() => { // parsing stops on '=>'
    document.getElementById('editor').style.display = 'none'
})()
// heck even:
let $$$$$

because parsing&executing stops at features of ES6, these would work.

~sircmpwn 4 years ago

Sorry, there's no chance that I'm going to support Opera mini. Try disabling JavaScript and using the normal textarea editor instead.

~smallick 4 years ago

I was using the textarea editor before... No option in this browser to "disable" JS. For now, I have to use a "bookmarklet" like this after loading that page:

javascript:document.querySelector('#editor').setAttribute('style','display:none')

Anyway, thanks for your support and design of these websites that work even on these older, "unsupported" browsers. That's great for (few) people like us who are still stuck with these.

Register here or Log in to comment, or comment via email.