codimd
codimd copied to clipboard
IE11 compatibility?
Hi!
I can't get CodiMD to work in IE11, there's some silly js error about unmatched tags and expecting a '('. Unfortunately, that's the only browser I am able to run on a particular machine I need a self-saving notepad that's actually beautiful & useful.
The above applies to both my own deployed install and your demo link.
Is this a known thing, did we give up on IE11?
I can reproduce the error with IE11 using our demo instance:

To be completely honest: I wouldn't want to write or support IE11 patches. The browser is now ~5 years old, and hasn't been updated for ~3 years. IE >=9 is still listed in the readme, so this is probably an oversight. The question remains: do we kick it out, or do enough people care about IE to chase down that problem?
@working-name looks like it broke with the recent changes in the TOC module.
If you want to put some time into it and fix it (of course we will try to provide all help you need), then I see no problem with continuing support for IE11 (and maybe previous). Otherwise, we may want to just drop it, since no one has enough interest to fix these things anyway and I have no (interest in) access to such a browser.
This seems to be the point where the biting starts:
https://github.com/hackmdio/codimd/blob/fe977434f9e90479c846f8bada2a6ce8df99e656/public/vendor/md-toc.js#L47
This would be a very nice first contribution! Basically: IE11 knows nothing of the default parameters in the function. The fix probably just requires taking te defaults out of line 47 and putting them into the body of the function. This is Q&A discusses a very similar problem in a different project.
Nice, thank you! I'll attempt this and see if it works. Unfortunately I'm not a developer so no guarantees there :)
Edit: as far as supporting the browser is concerned, I'm with you on that. I am in disbelief that this particular organization would not install a modern browser alongside the crippled & insecure IE11.
Okay, I addressed all the default values in md-toc.js and in base64url.js, a node module, not CodiMD.
Now IE11 loads the page fine, however, it is so sluggish it misses letters I type. Such a bummer. Chrome and Firefox are fine, of course, on the same system.
I'm also getting this:
SCRIPT12008: WebSocket Error: Incorrect HTTP response. Status code 400, Bad Request
And so does Firefox 62.0 (64-bit):
Firefox can’t establish a connection to the server at wss://domain/socket.io/?noteId=Ru-_TQVSTQyunsTrm2WCHA&EIO=3&transport=websocket&sid=QSEeQkCMfEojWcZYAAAI.
websocket.js:112
and Chrome
websocket.js:112 WebSocket connection to 'wss://domain/socket.io/?noteId=Ru-_TQVSTQyunsTrm2WCHA&EIO=3&transport=websocket&sid=UVBmXxqjBJQzF0FDAAAC' failed: Error during WebSocket handshake: Unexpected response code: 400
Those errors do not seem to have an effect. Everything is in order.
We no longer plan to support IE11. Will update the documentation.