Open boblannon-picwell opened 8 years ago
need fix smth like that:
--- a/dist/jsoneditor.js
+++ b/dist/jsoneditor.js
@@ -6246,7 +6246,7 @@ JSONEditor.AbstractTheme = Class.extend({
var el = document.createElement('div');
el.className = 'form-control';
if(label) el.appendChild(label);
- if(input.type === 'checkbox') {
+ if(label && input.type === 'checkbox') {
label.insertBefore(input,label.firstChild);
}
else {
Example of this breaking in the demo
the root of the problem is that
AbstractTheme.getFormControl
doesn't account for the case where a checkbox is being used in a theme wherecompact = true
(which means thatlabel
will be null)working on a PR.