mediawiki-extensions-CodeMi.../tests/jest
MusikAnimal 911b2d3d46 CodeMirror: add 'dir' and 'lang' attrs to .cm-editor and not .cm-content
Before we were adding these attributes to .cm-content, which didn't
encompass the gutter (line numbers). When you edited a LTR page in a RTL
interface language (or vice versa), the line gutter appeared on the
wrong side, which caused the cursor to be misaligned.

This commit fixes this by applying the direction and language to the
entire editor (.cm-editor), and not just .cm-content. However this means
the search panel could be in the page language when it should be the
interface language. This will be addressed in a follow-up patch.

Other attributes like 'class' that are copied from the textarea must
remain on .cm-content, because the parent .cm-scroller would otherwise
override them.

Bug: T359589
Change-Id: Id805944231fd75c1dc1c336e3cd4c7bc5c42c036
2024-03-13 11:19:16 -04:00
..
.eslintrc.json CodeMirror6: add new modules, feature flag, and URL query parameter 2023-10-09 19:51:24 -04:00
codemirror.bidiIsolation.test.js CodeMirror 6: Add bidi isolation to HTML tags 2024-03-11 17:34:41 -04:00
codemirror.mode.mediawiki.test.js CodeMirrorModeMediaWikiConfig: add missing tokens for nested templates 2024-03-05 00:34:34 -05:00
codemirror.test.js CodeMirror: add 'dir' and 'lang' attrs to .cm-editor and not .cm-content 2024-03-13 11:19:16 -04:00
codemirror.wikieditor.test.js CodeMirrorWikiEditor: Remove hack to fix height in WikiEditor 2024-03-13 11:18:20 -04:00
setup.js Utilize __non_webpack_require__ so we can source virtual files 2024-02-14 08:47:21 -05:00