Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/components/modules/blockSelection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@ export default class BlockSelection extends Module {
* remove selected blocks and insert pressed key
*/
if (this.anyBlockSelected && isKeyboard && isPrintableKey && !SelectionUtils.isSelectionExists) {
/** Prevent browser from also inserting the character (which would result in a double character) */
(reason as KeyboardEvent).preventDefault();

const indexToInsert = BlockManager.removeSelectedBlocks();

BlockManager.insertDefaultBlockAtIndex(indexToInsert, true);
Expand Down