allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [19/41] allura git commit: [#7897] ticket:804 Don't focus editor on render
Date Wed, 29 Jul 2015 21:10:19 GMT
[#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/master
Commit: 73d8cbf4cbac0d7571485a13b3a4b55b7661e065
Parents: 5a36a25
Author: Igor Bondarenko <jetmind2@gmail.com>
Authored: Tue Jul 7 12:27:38 2015 +0300
Committer: Igor Bondarenko <jetmind2@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);


Mime
View raw message