Lines Matching refs:onKeyPress
344 [];this.onKeyDown=this.onKeyDown.bind(this);this.onKeyPress=this.onKeyPress.bind(this);this.onDocumentClick=this.onDocumentClick.bind(this);this.addEventListener("visibleChange",b.prototype.onVisibleChange_.bind(this),!0);this.obeyCloseEvents=!0},get visible(){return this.visible_},set visible(a){base.setPropertyAndDispatchChange(this,"visible",a)},get obeyCloseEvents(){return this.obeyCloseEvents_},set obeyCloseEvents(a){base.setPropertyAndDispatchChange(this,"obeyCloseEvents",a);this.ownerDocument.querySelector(".overlay-root").toggleToolbar(a)},
345 get toolbar(){return this.ownerDocument.querySelector(".overlay-root .tool-bar")},onVisibleChange_:function(){var a=this.ownerDocument.querySelector(".overlay-root");this.visible?(a.setAttribute("visible","visible"),a.showOverlay(this),document.addEventListener("keydown",this.onKeyDown,!0),document.addEventListener("keypress",this.onKeyPress,!0),document.addEventListener("click",this.onDocumentClick,!0)):(a.removeAttribute("visible"),document.removeEventListener("keydown",this.onKeyDown,!0),document.removeEventListener("keypress",
346 this.onKeyPress,!0),document.removeEventListener("click",this.onDocumentClick,!0),a.hideOverlay(this))},onKeyDown:function(a){this.obeyCloseEvents&&27==a.keyCode&&(this.visible=!1,a.preventDefault())},onKeyPress:function(a){if(this.obeyCloseEvents)for(var c=0;c<this.additionalCloseKeyCodes.length;c++)if(a.keyCode==this.additionalCloseKeyCodes[c]){this.visible=!1;a.preventDefault();break}},onDocumentClick:function(a){if(this.obeyCloseEvents){for(var c=a.target;null!==c;){if(c===this)return;c=c.parentNode}this.visible=