From 60b84bb6bd9c96d322baa0c8eb163e62c875a506 Mon Sep 17 00:00:00 2001 From: Jos de Jong Date: Wed, 9 Sep 2020 09:29:45 +0200 Subject: [PATCH] Fix #1090: autocomplete firing on dragging or clicking a node --- HISTORY.md | 1 + src/js/treemode.js | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/HISTORY.md b/HISTORY.md index 637ec29..97dc485 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -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`. diff --git a/src/js/treemode.js b/src/js/treemode.js index b8c748a..41f2ce9 100644 --- a/src/js/treemode.js +++ b/src/js/treemode.js @@ -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(() => {