From eea700d0ac242c614b919caa9a50d3f264e57b40 Mon Sep 17 00:00:00 2001 From: Bingjian Guo Date: Fri, 13 Jun 2014 14:54:33 +0800 Subject: [PATCH] Pressing enter key while the Close button has focus does not cancel gotopage dialog --- support/GotoPagePane.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/support/GotoPagePane.js b/support/GotoPagePane.js index 6237c60b4..546dda1ff 100644 --- a/support/GotoPagePane.js +++ b/support/GotoPagePane.js @@ -50,9 +50,13 @@ define([ }, _onKeyDown: function(evt){ - if(!this.okBtn.get('disabled') && keys.ENTER == evt.keyCode){ - this._onOK(); - event.stop(evt); + if(!this.okBtn.get('disabled') ){ + if ( this.okBtn.get('focused') && keys.ENTER == evt.keyCode){ + + this._onOK(); + event.stop(evt); + } + } } });