TheDJ has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/130590

Change subject: IE8: Fix line endings in CodeEditor
......................................................................

IE8: Fix line endings in CodeEditor

IE8 uses innerText, which is a bit more sloppy with line ending
preservation than other browsers are. Instead of copying the value into
the DOM and have the Editor pick it up during init, just set it directly
on the EditSession. Should even be faster.

Bug: 64559
Change-Id: Iafbb07afb6d06ed94057f8ddf8b080fd136d7fb3
---
M modules/jquery.codeEditor.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeEditor 
refs/changes/90/130590/1

diff --git a/modules/jquery.codeEditor.js b/modules/jquery.codeEditor.js
index 88e289a..c483b4d 100644
--- a/modules/jquery.codeEditor.js
+++ b/modules/jquery.codeEditor.js
@@ -177,8 +177,8 @@
                                        container.width( box.width() )
                                                .height( box.height() );
 
-                                       editdiv.text( box.val() );
                                        context.codeEditor = ace.edit( 
editdiv[0] );
+                                       
context.codeEditor.getSession().setValue( box.val() );
 
                                        // Disable some annoying commands
                                        
context.codeEditor.commands.removeCommand( 'replace' );          // ctrl+R

-- 
To view, visit https://gerrit.wikimedia.org/r/130590
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iafbb07afb6d06ed94057f8ddf8b080fd136d7fb3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeEditor
Gerrit-Branch: master
Gerrit-Owner: TheDJ <hartman.w...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to