CM6: ensure search panel is in the same direction as the interface lang

We don't have access to the HTML attributes for .cm-panels, so we just
use CSS to set the direction.

Bug: T359611
Change-Id: I1d40ae4f7dc093f585051d388c70cde151faa5e6
This commit is contained in:
MusikAnimal 2024-03-25 20:00:26 -04:00
parent 10c9a9ee6f
commit efd6682398
2 changed files with 7 additions and 1 deletions

File diff suppressed because one or more lines are too long

View file

@ -164,6 +164,12 @@ class CodeMirror {
// These should be attributes of .cm-editor, not the .cm-content (T359589)
dir: this.$textarea.attr( 'dir' ),
lang: this.$textarea.attr( 'lang' )
} ),
// The search panel should use the same direction as the interface langauge (T359611)
EditorView.theme( {
'.cm-panels': {
direction: document.dir
}
} )
];
}