summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2014-12-04 17:44:19 +0200
committerAlon Levy <alon@pobox.com>2014-12-04 17:44:24 +0200
commitf6b559be36453f78177bf764757ccd0bcab8c299 (patch)
treeb5ad00a1a1a2cd79e8307dd384d5a33a6c57fdad /src
parent8fc8ac9326921d05896f62f3a05ef063b0956287 (diff)
Fixes #173 - note that an enter is still required when using u/down keys
Actual fix is change from keypress to keydown. tested with chrome.
Diffstat (limited to 'src')
-rw-r--r--src/textanalysis.ui.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/textanalysis.ui.js b/src/textanalysis.ui.js
index f0bbe105..5756fce0 100644
--- a/src/textanalysis.ui.js
+++ b/src/textanalysis.ui.js
@@ -117,8 +117,8 @@ return {
},
});
- var document_keypress = new Bacon.Bus();
- rz_bus.ui_key.plug(document_keypress);
+ var document_keydown = new Bacon.Bus();
+ rz_bus.ui_key.plug(document_keydown);
element.keydown(function(e) {
var ret = undefined;
@@ -144,7 +144,7 @@ return {
suggestionChange = true;
break;
}
- document_keypress.push({where: consts.KEYSTROKE_WHERE_DOCUMENT, keys: [e.keyCode]});
+ document_keydown.push({where: consts.KEYSTROKE_WHERE_DOCUMENT, keys: [e.keyCode]});
return ret;
});
@@ -170,9 +170,9 @@ return {
e.preventDefault();
});
- var element_keypress = new Bacon.Bus();
- rz_bus.ui_key.plug(element_keypress);
- element.keypress(function(e) {
+ var element_keydown = new Bacon.Bus();
+ rz_bus.ui_key.plug(element_keydown);
+ element.keydown(function(e) {
var ret = undefined;
switch (e.which) {
case 13:
@@ -190,7 +190,7 @@ return {
ret = false;
break;
}
- element_keypress.push({where: consts.KEYSTROKE_WHERE_TEXTANALYSIS, keys:[e.which]});
+ element_keydown.push({where: consts.KEYSTROKE_WHERE_TEXTANALYSIS, keys:[e.which]});
return ret;
});