B2G/gaia/apps/system/js/modal_dialog.js
// when the user try to escape the dialog with the escape key
when the user try to escape the dialog with the escape key
when the user try to escape the dialog with the escape key
function md_cancelHandler() {
    var evt = this.eventForCurrentOrigin;
    this.screen.classList.remove('modal-dialog');
    var elements = this.elements;
    var type = evt.detail.promptType || evt.detail.type;
    switch (type) {
      case 'alert':
        elements.alert.classList.remove('visible');
        break;
      case 'prompt':
        evt.detail.returnValue = null;
        elements.prompt.classList.remove('visible');
        break;
      case 'confirm':
        evt.detail.returnValue = false;
        elements.confirm.classList.remove('visible');
        break;
      case 'selectone':
        evt.detail.returnValue = null;
        elements.selectOne.classList.remove('visible');
        break;
    }
    if (evt.isPseudo && evt.cancelCallback) {
      evt.cancelCallback(evt.detail.returnValue);
    }
    if (evt.detail.unblock)
      evt.detail.unblock();
    this.processNextEvent();
  }
function md_cancelHandler ( ) { var evt = this . eventForCurrentOrigin ; this . screen . classList . remove ( 'modal-dialog' ) ; var elements = this . elements ; var type = evt . detail . promptType || evt . detail . type ; switch ( type ) { case 'alert' : elements . alert . classList . remove ( 'visible' ) ; break ; case 'prompt' : evt . detail . returnValue = null ; elements . prompt . classList . remove ( 'visible' ) ; break ; case 'confirm' : evt . detail . returnValue = false ; elements . confirm . classList . remove ( 'visible' ) ; break ; case 'selectone' : evt . detail . returnValue = null ; elements . selectOne . classList . remove ( 'visible' ) ; break ; } if ( evt . isPseudo && evt . cancelCallback ) { evt . cancelCallback ( evt . detail . returnValue ) ; } if ( evt . detail . unblock ) evt . detail . unblock ( ) ; this . processNextEvent ( ) ; }
when the user try to escape the dialog with the escape key
when the user try to escape the dialog with the escape key
/* return null when click cancel */ /* return false when click cancel */ /* return null when click cancel */