Use keydown instead of keypress on Firefox.#3413
Use keydown instead of keypress on Firefox.#3413muxator merged 1 commit intoether:developfrom mantaroh:develop
Conversation
|
Hi @Manta12, thanks for this PR. I would like to confirm if this change would indeed be compatible with currently supported Firefox versions. Ideally this should be a task for automated testing, or a QA team, but I am not sure we have someone in charge. Thank you again. |
|
Thanks muxator, Sorry for late my reply. Furthermore, this changes will not affect other UAs. (like Chrome/Safari..etc) I tried these browser just in case. Thanks! |
|
Merged, thanks. Fixes #3383. |
|
I just noted that this PR (merged in 2be873e) breaks the frontend tests ( if(inner$(window)[0].bowser.firefox || inner$(window)[0].bowser.modernIE){ // if it's a mozilla or IE
var evtType = "keypress";
}else{
var evtType = "keydown";
}Taking out the special check for Firefox goes back to |
This puts issue: #3383, PR: #3413 (Use keydown instead of keypress on Firefox) directly on top of bacc37c, which is the last commit before fe08d2a merged #3268 (getLineHTMLForExport - Fixes #2486 but breaks plugins). This is necessary for showing that: - bacc37c was passing client side tests on firefox Visit `http://<yourhost>/tests/frontend/` using firefox. - 2be873e 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
These changes make the frontend tests send keydown instead of keypress in firefox, in accordance with #3413 (Use keydown instead of keypress on Firefox). The percentage of passing frontend in Firefox 61 on this revision is 100%.
This related with issue #3383.
Firefox will not fire the keypress when target key is the non-printable keys. (like Enter / Tab / Delete... etc) For detail, see https://bugzilla.mozilla.org/show_bug.cgi?id=1440189.
This behavior is same as safari / chrome, So etherpad-lite will not need to special handling of these key when UA is Firefox. This PR will use keydown event when target key is no-printable keys.