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/14 17:03:09 UTC

[28/50] [abbrv] 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/72d98320
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/72d98320
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/72d98320

Branch: refs/heads/ib/7897
Commit: 72d983202df6a77a3f8cdb41163ac5e0e62fd852
Parents: 576d4d2
Author: Igor Bondarenko <je...@gmail.com>
Authored: Tue Jul 7 12:27:38 2015 +0300
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Tue Jul 14 11:46:01 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/72d98320/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);