Skip to content

Commit 2be873e

Browse files
mantarohmuxator
authored andcommitted
Use keydown instead of keypress on Firefox.
1 parent f35d345 commit 2be873e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/static/js/ace2_inner.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3708,8 +3708,8 @@ function Ace2Inner(){
37083708
return; // This stops double enters in Opera but double Tabs still show on single tab keypress, adding keyCode == 9 to this doesn't help as the event is fired twice
37093709
}
37103710
var specialHandled = false;
3711-
var isTypeForSpecialKey = ((browser.msie || browser.safari || browser.chrome) ? (type == "keydown") : (type == "keypress"));
3712-
var isTypeForCmdKey = ((browser.msie || browser.safari || browser.chrome) ? (type == "keydown") : (type == "keypress"));
3711+
var isTypeForSpecialKey = ((browser.msie || browser.safari || browser.chrome || browser.firefox) ? (type == "keydown") : (type == "keypress"));
3712+
var isTypeForCmdKey = ((browser.msie || browser.safari || browser.chrome || browser.firefox) ? (type == "keydown") : (type == "keypress"));
37133713
var stopped = false;
37143714

37153715
inCallStackIfNecessary("handleKeyEvent", function()

0 commit comments

Comments
 (0)