Fixed #855: focus tracker not created when creating an editor without main menu bar
This commit is contained in:
parent
c1d2f124c2
commit
1026d9102c
|
@ -3,6 +3,12 @@
|
|||
https://github.com/josdejong/jsoneditor
|
||||
|
||||
|
||||
## not yet published, version 7.3.1
|
||||
|
||||
- Fixed #855: focus tracker (for `onFocus` and `onBlur) not created when
|
||||
creating an editor without main menu bar.
|
||||
|
||||
|
||||
## 2019-11-27, version 7.3.0
|
||||
|
||||
- Implemented callbacks `onFocus` and `onBlur` (PR #809, issue #727).
|
||||
|
|
|
@ -104,6 +104,14 @@ textmode.create = function (container, options = {}) {
|
|||
me._onKeyDown(event)
|
||||
}
|
||||
|
||||
// setting the FocusTracker on 'this.frame' to track the editor's focus event
|
||||
const focusTrackerConfig = {
|
||||
target: this.frame,
|
||||
onFocus: this.options.onFocus || null,
|
||||
onBlur: this.options.onBlur || null
|
||||
}
|
||||
this.frameFocusTracker = new FocusTracker(focusTrackerConfig)
|
||||
|
||||
this.content = document.createElement('div')
|
||||
this.content.className = 'jsoneditor-outer'
|
||||
|
||||
|
@ -145,15 +153,6 @@ textmode.create = function (container, options = {}) {
|
|||
}
|
||||
}
|
||||
|
||||
// setting the FocusTracker on 'this.frame' to track the editor's focus event
|
||||
const focusTrackerConfig = {
|
||||
target: this.frame,
|
||||
onFocus: this.options.onFocus || null,
|
||||
onBlur: this.options.onBlur || null
|
||||
}
|
||||
|
||||
this.frameFocusTracker = new FocusTracker(focusTrackerConfig)
|
||||
|
||||
// create sort button
|
||||
if (this.options.enableSort) {
|
||||
const sort = document.createElement('button')
|
||||
|
|
Loading…
Reference in New Issue