You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by wo...@apache.org on 2019/02/15 18:57:22 UTC
[couchdb-fauxton] branch master updated: Avoid overriding Browser's
default in CodeEditor (#1187)
This is an automated email from the ASF dual-hosted git repository.
wohali pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-fauxton.git
The following commit(s) were added to refs/heads/master by this push:
new c44e62e Avoid overriding Browser's default in CodeEditor (#1187)
c44e62e is described below
commit c44e62e3f48bc3277c4b7a83c879b3aa7d14f23b
Author: Guillaume Massé <ma...@gmail.com>
AuthorDate: Fri Feb 15 13:57:17 2019 -0500
Avoid overriding Browser's default in CodeEditor (#1187)
---
app/addons/components/components/codeeditor.js | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/app/addons/components/components/codeeditor.js b/app/addons/components/components/codeeditor.js
index d82c9f1..7854764 100644
--- a/app/addons/components/components/codeeditor.js
+++ b/app/addons/components/components/codeeditor.js
@@ -81,6 +81,14 @@ export class CodeEditor extends React.Component {
setupAce = (props, shouldUpdateCode) => {
this.editor = ace.edit(this.ace);
+ // see https://github.com/ajaxorg/ace/issues/36 don't steal browser's default keybinding
+ this.editor.commands.bindKeys(
+ {
+ "Ctrl-L|Command-L": null,
+ "Ctrl-Shift-L|Command-Shift-L": "gotoline"
+ }
+ );
+
// suppresses an Ace editor error
this.editor.$blockScrolling = Infinity;