Steps to replicate the issue (include links if applicable):
- Browse to https://ar.wikipedia.org/w/index.php?title=%D8%A8%D8%B1%D9%86%D8%A7%D9%85%D8%AC_%D8%A7%D9%84%D8%B5%D9%88%D8%A7%D8%B1%D9%8A%D8%AE_%D8%A7%D9%84%D8%A5%D9%8A%D8%B1%D8%A7%D9%86%D9%8A%D8%A9&action=edit&cm6enable=1
- Use ⌃+end to browse to the bottom of the document
- Slowly scroll up
What happens?:
Eventually everything is either highlighted as green (same color tags are supposed to have), or purple (templates). Or, you may see no highlighting at all.
With bidi isolation applied (T358804), CodeMirror may error out entirely:
Uncaught TypeError: Cannot read properties of undefined (reading 'length')
What should have happened instead?:
Syntax highlighting should work as expected.
Other information:
This is a rather extreme example, being one of the largest articles on Arabic Wikipedia. Maybe things breaking is expected here.
What we should prevent however are the errors that can happen. Perhaps automatically disable CodeMirror due to performance reasons and show a message stating such, or something?