_onEvent (event) {
    const target = event.target
    let focusFlag
    if (target === this.target) {
      focusFlag = true
    } else if (this.target.contains(target) || this.target.contains(document.activeElement)) {
      focusFlag = true
    } else {
      focusFlag = false
    }

    if (focusFlag) {
      if (!this.focusFlag) {
        // trigger the onFocus callback
        if (this.onFocus) {
          this.onFocus({ type: 'focus', target: this.target })
        }
        this.focusFlag = true
      }
    } else {
      if (this.focusFlag || this.firstEventFlag) {
        // trigger the onBlur callback
        if (this.onBlur) {
          this.onBlur({ type: 'blur', target: this.target })
        }
        this.focusFlag = false

        /*
          When switching from one mode to another in the editor, the FocusTracker gets recreated.
          At that time, this.focusFlag will be init to 'false' and will fail the above if condition, when blur occurs
          this.firstEventFlag is added to overcome that issue
         */
        if (this.firstEventFlag) {
          this.firstEventFlag = false
        }
      }
    }
  }
Tracks the focus of the target and calls the onFocus and onBlur
event callbacks if available.
@param {Event} [event]  The 'click' or 'keyup' event object,
                         from the respective events set on
             document object
@private