You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Question
The Changelog of this project states that in v2.18 the following change was made:
Improvements - Disabled useCapture flag for a block keydown handling. That will allow plugins to override keydown and stop event propagation, for example, to make own Tab behavior.
However, in v2.19 (I migrated straight from v2.17 to v2.19) it seems that this is not true. I made a custom block tool for code listings which includes a textarea element. I've attached a simple handler to it like this:
This code half works: preventDefault works well but stopPropagation doesn't.
So I used the "Event Listeners" tab of Chrome's debugger and I figured out that editor.js attached keydown event listeners to every .ce-block element and useCapture set to true. The listener callback link points to editor.js:2 (minified version) but after beautification it seems that Chrome was trying to show me this:
Question
The Changelog of this project states that in v2.18 the following change was made:
However, in v2.19 (I migrated straight from v2.17 to v2.19) it seems that this is not true. I made a custom block tool for code listings which includes a textarea element. I've attached a simple handler to it like this:
This code half works:
preventDefault
works well butstopPropagation
doesn't.So I used the "Event Listeners" tab of Chrome's debugger and I figured out that editor.js attached
keydown
event listeners to every.ce-block
element anduseCapture
set totrue
. The listener callback link points to editor.js:2 (minified version) but after beautification it seems that Chrome was trying to show me this:editor.js/src/components/modules/blockManager.ts
Line 710 in 43032eb
So, where is the truth? Was that feature of v2.18 rolled back in v2.19, or I misunderstood what changelog says or it's a bug in implementation?
The text was updated successfully, but these errors were encountered: