diff --git a/index.js b/index.js index d9fe3db..ace9449 100644 --- a/index.js +++ b/index.js @@ -132,7 +132,9 @@ const _onBeforeInput = shortcutsOfWindow => (e, input) => { for (const {eventStamp, callback} of shortcutsOfWindow) { if (equals(eventStamp, event)) { debug(`eventStamp: ${eventStamp} match`); - callback(); + if (callback()) { + e.preventDefault(); + } return; }