From e1a8077dc18c4ab5b975e46396642be4e5668258 Mon Sep 17 00:00:00 2001 From: Jos de Jong Date: Wed, 23 Sep 2020 10:27:47 +0200 Subject: [PATCH] Fix quick-key `Ctrl+D` (duplicate) not working --- HISTORY.md | 1 + src/js/Node.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index b76d0d6..ce16664 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -9,6 +9,7 @@ https://github.com/josdejong/jsoneditor Thanks @ziga-miklic. - Fixed JSONEditor not working when opened in a new window, see #1098. Thanks @joshkel. +- Fix quick-key `Ctrl+D` (duplicate) not working. - Define "charset: utf-8" in all HTML examples. diff --git a/src/js/Node.js b/src/js/Node.js index 111f017..c12ecf7 100644 --- a/src/js/Node.js +++ b/src/js/Node.js @@ -4555,7 +4555,7 @@ Node.onDuplicate = nodes => { if (clones[0].parent.type === 'object') { // when duplicating a single object property, // set focus to the field and keep the original field name - clones[0].dom.field.innerHTML = this._escapeHTML(nodes[0].field) + clones[0].dom.field.innerHTML = nodes[0]._escapeHTML(nodes[0].field) clones[0].focus('field') } else { clones[0].focus()