Fix quick-key `Ctrl+D` (duplicate) not working

This commit is contained in:
Jos de Jong 2020-09-23 10:27:47 +02:00
parent 745a1597dd
commit e1a8077dc1
2 changed files with 2 additions and 1 deletions

View File

@ -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.

View File

@ -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()