mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
fix(key) chrome event double pass
This commit is contained in:
parent
137673c551
commit
7e6b3c6ba5
1 changed files with 5 additions and 0 deletions
|
|
@ -58,6 +58,11 @@ function KeyProto() {
|
|||
async function listener(event) {
|
||||
const {keyCode} = event;
|
||||
|
||||
// strange chrome bug calles listener twice
|
||||
// in second time event misses a lot fields
|
||||
if (typeof event.altKey === 'undefined')
|
||||
return;
|
||||
|
||||
const alt = event.altKey;
|
||||
const ctrl = event.ctrlKey;
|
||||
const shift = event.shiftKey;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue