Fixed #755: JSONEditor throwing an exception in mode `code`, `text`, and
`preview` when `statusBar: false`
This commit is contained in:
parent
f0097afcc0
commit
9892249e49
|
@ -2,6 +2,12 @@
|
|||
|
||||
https://github.com/josdejong/jsoneditor
|
||||
|
||||
## not yet publised, version 6.2.2
|
||||
|
||||
- Fixed #755: JSONEditor throwing an exception in mode `code`, `text`, and
|
||||
`preview` when `statusBar: false`.
|
||||
|
||||
|
||||
## 2019-08-01, version 6.2.1
|
||||
|
||||
- Updated Chinese translation. Thanks @SargerasWang.
|
||||
|
|
|
@ -236,7 +236,8 @@ previewmode.create = function (container, options) {
|
|||
onFocusLine: null,
|
||||
onChangeHeight: function (height) {
|
||||
// TODO: change CSS to using flex box, remove setting height using JavaScript
|
||||
var totalHeight = height + me.dom.statusBar.clientHeight + 1;
|
||||
var statusBarHeight = me.dom.statusBar ? me.dom.statusBar.clientHeight : 0;
|
||||
var totalHeight = height + statusBarHeight + 1;
|
||||
me.content.style.marginBottom = (-totalHeight) + 'px';
|
||||
me.content.style.paddingBottom = totalHeight + 'px';
|
||||
}
|
||||
|
|
|
@ -296,7 +296,8 @@ textmode.create = function (container, options) {
|
|||
},
|
||||
onChangeHeight: function (height) {
|
||||
// TODO: change CSS to using flex box, remove setting height using JavaScript
|
||||
var totalHeight = height + me.dom.statusBar.clientHeight + 1;
|
||||
var statusBarHeight = me.dom.statusBar ? me.dom.statusBar.clientHeight : 0;
|
||||
var totalHeight = height + statusBarHeight + 1;
|
||||
me.content.style.marginBottom = (-totalHeight) + 'px';
|
||||
me.content.style.paddingBottom = totalHeight + 'px';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue