You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by je...@apache.org on 2015/07/08 11:58:46 UTC

[11/21] allura git commit: [#7897] ticket:804 Don't focus editor on render

[#7897] ticket:804 Don't focus editor on render

It is a bit hacky, because we change it in the library code, but it does
not give us any options here.  We probably should fork the library and
make the following changes:

- allow custom options to be passed to CodeMirror
- allow custom code to render preview (saves us from copy&pasting some
  code)
- allow override toolbar buttons with custom actions (we can redefine
  code block button, instead of hiding it)


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/2008f8d4
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/2008f8d4
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/2008f8d4

Branch: refs/heads/ib/7897
Commit: 2008f8d4cac6b0798897831486716f76b102122b
Parents: 6556bcf
Author: Igor Bondarenko <je...@gmail.com>
Authored: Tue Jul 7 12:27:38 2015 +0300
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Tue Jul 7 12:27:38 2015 +0300

----------------------------------------------------------------------
 Allura/allura/lib/widgets/resources/js/markdown_editor/editor.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/2008f8d4/Allura/allura/lib/widgets/resources/js/markdown_editor/editor.js
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/widgets/resources/js/markdown_editor/editor.js b/Allura/allura/lib/widgets/resources/js/markdown_editor/editor.js
index 7fbeede..435a7a8 100644
--- a/Allura/allura/lib/widgets/resources/js/markdown_editor/editor.js
+++ b/Allura/allura/lib/widgets/resources/js/markdown_editor/editor.js
@@ -7211,7 +7211,7 @@ Editor.prototype.render = function(el) {
     tabSize: '2',
     indentWithTabs: true,
     lineNumbers: false,
-    autofocus: true,
+    autofocus: false,
     extraKeys: keyMaps
   });
 
@@ -7392,4 +7392,4 @@ Editor.prototype.toggleFullScreen = function() {
 };
 
 global.Editor = Editor;
-})(this);
\ No newline at end of file
+})(this);