Fix quick-key `Ctrl+D` (duplicate) not working
This commit is contained in:
parent
745a1597dd
commit
e1a8077dc1
|
@ -9,6 +9,7 @@ https://github.com/josdejong/jsoneditor
|
||||||
Thanks @ziga-miklic.
|
Thanks @ziga-miklic.
|
||||||
- Fixed JSONEditor not working when opened in a new window, see #1098.
|
- Fixed JSONEditor not working when opened in a new window, see #1098.
|
||||||
Thanks @joshkel.
|
Thanks @joshkel.
|
||||||
|
- Fix quick-key `Ctrl+D` (duplicate) not working.
|
||||||
- Define "charset: utf-8" in all HTML examples.
|
- Define "charset: utf-8" in all HTML examples.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4555,7 +4555,7 @@ Node.onDuplicate = nodes => {
|
||||||
if (clones[0].parent.type === 'object') {
|
if (clones[0].parent.type === 'object') {
|
||||||
// when duplicating a single object property,
|
// when duplicating a single object property,
|
||||||
// set focus to the field and keep the original field name
|
// 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')
|
clones[0].focus('field')
|
||||||
} else {
|
} else {
|
||||||
clones[0].focus()
|
clones[0].focus()
|
||||||
|
|
Loading…
Reference in New Issue