Never load ext.CodeMirror on RTL pages

This does not affect the VE integration, which
does support RTL.

Bug: T191923
Change-Id: I817498157bcc3ff0b92d1ee0e9cf9fc96be83d2f
This commit is contained in:
Ed Sanders 2018-04-18 12:06:37 +01:00 committed by Jforrester
parent d428893b80
commit d4d92f921f

View file

@ -37,6 +37,8 @@ class CodeMirrorHooks {
*/
private static function isCodeMirrorOnPage( IContextSource $context ) {
return in_array( Action::getActionName( $context ), [ 'edit', 'submit' ] ) &&
// CodeMirror on textarea wikitext editors doesn't support RTL (T170001)
!$context->getTitle()->getPageLanguage()->isRTL() &&
self::isCodeMirrorEnabled( $context );
}