Skip to content

Commit

Permalink
Fix #1090: autocomplete firing on dragging or clicking a node
Browse files Browse the repository at this point in the history
  • Loading branch information
josdejong committed Sep 9, 2020
1 parent 2cbac6f commit 60b84bb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ https://github.com/josdejong/jsoneditor

## not yet published, version 9.0.5

- Fix #1090: autocomplete firing on dragging or clicking a node.
- Fix #1096: editor crashing when passing an empty string as `name`.
- Updated dependencies to `ajv@6.12.4`.

Expand Down
5 changes: 5 additions & 0 deletions src/js/treemode.js
Original file line number Diff line number Diff line change
Expand Up @@ -1490,6 +1490,11 @@ treemode._showAutoComplete = function (element) {
if (element.className.indexOf('jsoneditor-value') >= 0) jsonElementType = 'value'
if (element.className.indexOf('jsoneditor-field') >= 0) jsonElementType = 'field'

if (jsonElementType === '') {
// Unknown element field. Could be a button or something else
return
}

const self = this

setTimeout(() => {
Expand Down

0 comments on commit 60b84bb

Please sign in to comment.