commit d8736696dbb71efd67dc15d17c66a2400a6b4726
| author | 斟酌 鵬兄 <tgckpg@gmail.com> |
| date | 2016-02-06T21:42:30Z |
| subject | Should prevent default since it is handled |
commit d8736696dbb71efd67dc15d17c66a2400a6b4726
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date: 2016-02-06T21:42:30Z
Should prevent default since it is handled
---
botanjs/src/Components/MessageBox.js | 2 ++
1 file changed, 2 insertions(+)
diff --git a/botanjs/src/Components/MessageBox.js b/botanjs/src/Components/MessageBox.js
index 8210c0a..52f0992 100644
--- a/botanjs/src/Components/MessageBox.js
+++ b/botanjs/src/Components/MessageBox.js
@@ -32,10 +32,12 @@
if ( no && code == 27 )
{
+ e.preventDefault();
_no.click();
}
else if( code == 13 && ( e.ctrlKey || e.altKey ) )
{
+ e.preventDefault();
_yes.click();
}
}