Skip to content

Commit b4fa6c4

Browse files
committed
Onkeydown results in refreshing the page, changed it to onkeyup
1 parent a1e5ebd commit b4fa6c4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/SearchInput/widget/SearchInput.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ define([
5454

5555
_setupEvents: function() {
5656

57-
this.connect(this.searchInputNode, "onkeyup", dojoLang.hitch(this, this.onKeyUp));
57+
this.connect(this.searchInputNode, "onkeydown", dojoLang.hitch(this, this.onKeyDown));
5858
this.connect(this.searchSelectNode, "onclick", dojoLang.hitch(this, function(e) {
5959
this.executeMicroflow(this.mfToExecute);
6060
}));
@@ -79,7 +79,7 @@ define([
7979
mendix.lang.nullExec(callback);
8080
},
8181

82-
onKeyUp: function(event) {
82+
onKeyDown: function(event) {
8383
if (event.keyCode == dojoKeys.ENTER) {
8484
this._contextObj.set(this.targetAttribute, this.searchInputNode.value);
8585
event.preventDefault();

test/widgets/SearchInput.mpk

2 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)