Use keydown instead of keypress on Firefox (cherry pick from 2be873e3c7)

This puts issue: #3383, PR: #3413 (Use keydown instead of keypress on Firefox)
directly on top of bacc37cf9b, which is the last commit before fe08d2a1db
merged #3268 (getLineHTMLForExport - Fixes #2486 but breaks plugins).

This is necessary for showing that:

- bacc37cf9b was passing client side tests on firefox
  Visit `http://<yourhost>/tests/frontend/` using firefox.

- 2be873e3c7 forgot to update the client side tests. You cannot test it since
  that commit was mad on top of other changes, hence this graft

- in this commit there are 20 failures with firefox:
  passes: 82 failures: 20 duration: 261.84s
This commit is contained in:
Mantary 2018-06-28 16:41:06 +09:00
parent bacc37cf9b
commit f17fe571df
1 changed files with 2 additions and 2 deletions

View File

@ -3708,8 +3708,8 @@ function Ace2Inner(){
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 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
} }
var specialHandled = false; var specialHandled = false;
var isTypeForSpecialKey = ((browser.msie || browser.safari || browser.chrome) ? (type == "keydown") : (type == "keypress")); var isTypeForSpecialKey = ((browser.msie || browser.safari || browser.chrome || browser.firefox) ? (type == "keydown") : (type == "keypress"));
var isTypeForCmdKey = ((browser.msie || browser.safari || browser.chrome) ? (type == "keydown") : (type == "keypress")); var isTypeForCmdKey = ((browser.msie || browser.safari || browser.chrome || browser.firefox) ? (type == "keydown") : (type == "keypress"));
var stopped = false; var stopped = false;
inCallStackIfNecessary("handleKeyEvent", function() inCallStackIfNecessary("handleKeyEvent", function()