fix(key) chrome event double pass

This commit is contained in:
coderaiser 2019-08-21 22:07:56 +03:00
parent 137673c551
commit 7e6b3c6ba5

View file

@ -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;