If you double tap the spacebar on mac the selection moves 2 spaces to the right and inserts a period. (This also happens in the ProseMirror demos)
Is there a way to disable this?
We have tried the following:
A custom handleKeyDown function for the space key.
We then added our own custom handler that adds a single space character…
const spaceMark = view.state.schema.marks.space.create(); const spaceEntity = view.state.schema.text(' ', [spaceMark]); let transaction = view.state.tr; transaction.replaceWith(view.selection.from, view.selection.to, [ spaceEntity ]); dispatch(transaction); return true;
This prevents the period from being added but the selection still moves to the right.
Are we missing something or is this a bug… The second event gives an
event.keyCode of 229 - I have tried canceling this too.
It looks like codepen have managed to disable this. It must be something that is able to be overridden. Any help would be great.
Thanks for the awesome library!