diff --git a/src/core.js b/src/core.js index d268b34..cfb062a 100644 --- a/src/core.js +++ b/src/core.js @@ -458,12 +458,15 @@ } }, tap: { - attach: ['pointerdown', 'pointerup'], - condition: function(event, custom){ + attach: ['pointerdown', 'pointerup', 'keypress'], + condition: function (event, custom) { if (event.type == 'pointerdown') { custom.startX = event.clientX; custom.startY = event.clientY; } + else if (event.type == 'keypress') { + return event.key == "Enter" || event.key == " "; + } else if (event.button === 0 && Math.abs(custom.startX - event.clientX) < 10 && Math.abs(custom.startY - event.clientY) < 10) return true;