diff --git a/HISTORY.md b/HISTORY.md index bdf547a..07924d9 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -3,6 +3,11 @@ https://github.com/josdejong/jsoneditor +## not yet released, version 5.0.1 + +- Fixed #130: option `onEditable` not available in mode `form`. + + ## 2015-12-31, version 5.0.0 - New design. diff --git a/src/js/Node.js b/src/js/Node.js index 3993df8..2490ba1 100644 --- a/src/js/Node.js +++ b/src/js/Node.js @@ -43,7 +43,8 @@ Node.prototype._updateEditability = function () { this.editable.field = this.editor.options.mode === 'tree'; this.editable.value = this.editor.options.mode !== 'view'; - if (this.editor.options.mode === 'tree' && (typeof this.editor.options.onEditable === 'function')) { + if ((this.editor.options.mode === 'tree' || this.editor.options.mode === 'form') && + (typeof this.editor.options.onEditable === 'function')) { var editable = this.editor.options.onEditable({ field: this.field, value: this.value,