From 0432bd95f2afbbe23622e3adcdac15024c7126c0 Mon Sep 17 00:00:00 2001 From: jos Date: Mon, 15 Feb 2016 20:35:19 +0100 Subject: [PATCH] Fixed #272: Checkbox for boolean values visible in view mode --- HISTORY.md | 5 +++++ src/js/Node.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index 953b461..708c530 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -3,6 +3,11 @@ https://github.com/josdejong/jsoneditor +## 2016-02-15, version 5.1.5 + +- Fixed #272: Checkbox for boolean values visible in view mode. + + ## 2016-02-13, version 5.1.4 - Fixed broken example 04_load_and_save.html. See #265. diff --git a/src/js/Node.js b/src/js/Node.js index faf006e..707ab11 100644 --- a/src/js/Node.js +++ b/src/js/Node.js @@ -1248,7 +1248,7 @@ Node.prototype._updateDomValue = function () { } // show checkbox when the value is a boolean - if (type === 'boolean') { + if (type === 'boolean' && this.editable.value) { if (!this.dom.checkbox) { this.dom.checkbox = document.createElement('input'); this.dom.checkbox.type = 'checkbox';