Steps to replicate the issue (include links if applicable):
- Load a page on a wiki still running CodeMirror 5, but use the cm6enable=1 flag with the 2017 editor https://patchdemo.wmcloud.org/wikis/4226970e0f/wiki/CodeMirror?veaction=editsource&cm6enable=1
- Open your developer tools, and under "Network", look for the throttling option and set it to something slow like 'Regular 2G' (Chrome and Firefox have a dropdown labeled "No throttling")
- Refresh, keeping the developer tools open
What happens?:
The editor loads, but without syntax highlighting. The option is missing from the 'Page options' dropdown where it is normally placed.
What should have happened instead?:
It should have syntax highlighting, and the option should be listed in the 'Page options' dropdown.
Other information
There's some sort of race condition with the combination of CodeMirror 6 and the 2017 editor (RL module ext.CodeMirror.v6.visualEditor). if things are slow enough, the ve.ui.CodeMirrorTool constructor doesn't get called.