diff --git a/src/mousetracker.js b/src/mousetracker.js index 7f710c78..b14a32e3 100644 --- a/src/mousetracker.js +++ b/src/mousetracker.js @@ -2857,8 +2857,6 @@ case 'pointerover': case 'pointerout': case 'contextmenu': - case 'keydown': - case 'keyup': eventInfo.isStopable = true; eventInfo.isCancelable = true; eventInfo.preventDefault = false; @@ -2909,6 +2907,20 @@ eventInfo.preventGesture = false; eventInfo.stopPropagation = false; break; + case 'keydown': + eventInfo.isStopable = true; + eventInfo.isCancelable = true; + eventInfo.preventDefault = !!tracker.keyDownHandler; + eventInfo.preventGesture = false; + eventInfo.stopPropagation = false; + break; + case 'keyup': + eventInfo.isStopable = true; + eventInfo.isCancelable = true; + eventInfo.preventDefault = !!tracker.keyUpHandler; + eventInfo.preventGesture = false; + eventInfo.stopPropagation = false; + break; case 'keypress': eventInfo.isStopable = true; eventInfo.isCancelable = true;