Fixed #272: Checkbox for boolean values visible in view mode

This commit is contained in:
jos 2016-02-15 20:35:19 +01:00
parent fdfbd02ff7
commit 0432bd95f2
2 changed files with 6 additions and 1 deletions

View File

@ -3,6 +3,11 @@
https://github.com/josdejong/jsoneditor 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 ## 2016-02-13, version 5.1.4
- Fixed broken example 04_load_and_save.html. See #265. - Fixed broken example 04_load_and_save.html. See #265.

View File

@ -1248,7 +1248,7 @@ Node.prototype._updateDomValue = function () {
} }
// show checkbox when the value is a boolean // show checkbox when the value is a boolean
if (type === 'boolean') { if (type === 'boolean' && this.editable.value) {
if (!this.dom.checkbox) { if (!this.dom.checkbox) {
this.dom.checkbox = document.createElement('input'); this.dom.checkbox = document.createElement('input');
this.dom.checkbox.type = 'checkbox'; this.dom.checkbox.type = 'checkbox';