search problem

This commit is contained in:
Senad Uka
2015-10-11 06:37:17 +02:00
parent b432ca58d5
commit 3c5be78146
3 changed files with 37 additions and 25 deletions

View File

@@ -34,7 +34,8 @@ var SearchBox = React.createClass({
},
onKeyPress: function(e) {
var enterKeyCode = 13;
if(e.which == enterKeyCode) {
var whichKey = e.key || e.which;
if(whichKey == enterKeyCode) {
this.doSearch();
e.preventDefault();
}