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/27 15:11:54 UTC

[33/49] 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/73d8cbf4
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/73d8cbf4
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/73d8cbf4

Branch: refs/heads/ib/7897
Commit: 73d8cbf4cbac0d7571485a13b3a4b55b7661e065
Parents: 5a36a25
Author: Igor Bondarenko <je...@gmail.com>
Authored: Tue Jul 7 12:27:38 2015 +0300
Committer: Igor Bondarenko <je...@gmail.com>
Committed: Mon Jul 27 14:23:55 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/73d8cbf4/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);