From 0b3b23e92e8cf510e36b5e51d9aee6080539379a Mon Sep 17 00:00:00 2001 From: jos Date: Mon, 21 Dec 2015 13:24:37 +0100 Subject: [PATCH] disabled `Ctrl+L` quick key to go to a line, instead use the default browser behavior of selecting the address bar. --- HISTORY.md | 2 ++ src/js/textmode.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/HISTORY.md b/HISTORY.md index e4c856f..6924458 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -7,6 +7,8 @@ https://github.com/josdejong/jsoneditor - Replaced the PNG icon images with SVG. Thanks @1j01. - Fixed #234: Remove dependency on a fork of the `jsonlint` project on github. +- Fixed: disabled `Ctrl+L` quick key to go to a line, instead use the default + browser behavior of selecting the address bar. ## 2015-06-13, version 4.2.1 diff --git a/src/js/textmode.js b/src/js/textmode.js index bd4751a..7b1f7ee 100644 --- a/src/js/textmode.js +++ b/src/js/textmode.js @@ -139,6 +139,8 @@ textmode.create = function (container, options) { editor.getSession().setTabSize(this.indentation); editor.getSession().setUseSoftTabs(true); editor.getSession().setUseWrapMode(true); + editor.commands.bindKey('Ctrl-L', null); // disable Ctrl+L (is used by the browser to select the address bar) + editor.commands.bindKey('Command-L', null); // disable Ctrl+L (is used by the browser to select the address bar) this.editor = editor; var poweredBy = document.createElement('a');