src/view/Pane.js
function tryFocusingCurrentView() {
            if (self._currentView) {
                if (self._currentView.focus) {
                    //  Views can implement a focus
                    //  method for focusing a complex
                    //  DOM like codemirror
                    self._currentView.focus();
                } else {
                    //  Otherwise, no focus method
                    //  just try and give the DOM
                    //  element focus
                    self._currentView.$el.focus();
                }
            } else {
                // no view so just focus the pane
                self.$el.focus();
            }
        }
function tryFocusingCurrentView() {
            if (self._currentView) {
                if (self._currentView.focus) {
                    //  Views can implement a focus
                    //  method for focusing a complex
                    //  DOM like codemirror
                    self._currentView.focus();
                } else {
                    //  Otherwise, no focus method
                    //  just try and give the DOM
                    //  element focus
                    self._currentView.$el.focus();
                }
            } else {
                // no view so just focus the pane
                self.$el.focus();
            }
        }
function tryFocusingCurrentView ( ) { if ( self . _currentView ) { if ( self . _currentView . focus ) { //  Views can implement a focus //  method for focusing a complex //  DOM like codemirror self . _currentView . focus ( ) ; } else { //  Otherwise, no focus method //  just try and give the DOM //  element focus self . _currentView . $el . focus ( ) ; } } else { // no view so just focus the pane self . $el . focus ( ) ; } }
Helper to focus the current view if it can
Helper to focus the current view if it can