environment: chromium web browser
However, press backspace without selection, the “handleKeydown” event can be triggered. How to uniform these two event handling procedures?
environment: chromium web browser
However, press backspace without selection, the “handleKeydown” event can be triggered. How to uniform these two event handling procedures?
I see handleKeyDown
being called in this case, also on Chromium.
Yep, it is triggered from editHandlers.keydown
. In my case,
the handleKeyDown
event is suppressed by tiptap keymap extension. It’s suppressed by deletedContent when view.state.selection.empty is false.
I think it is a bug in tiptap, because view.someProp(“handleKeyDown”, f => f(view, event)) will only run once when event is already suppressed.