Kit / slate-plugins

A collection of plugins for SlateJS, maintained by ConvertKit
https://convertkit-slate-plugins.netlify.com/
MIT License
52 stars 22 forks source link

example on `slate-code` is not working properly #28

Open isubasti opened 5 years ago

isubasti commented 5 years ago

the onKeyDown example on slate-code's doc only return next() inside the ctrlKey check therefore some keys are not handled properly see https://slate-js.slack.com/archives/C1RH7AXSS/p1553824026021400

brendancarney commented 5 years ago

Thanks for the report @isubasti, I'll look into this soon.

brendancarney commented 5 years ago

I'm unable to reproduce this issue. I asked the reporter in slack for a CodeSandbox to reproduce.

brendancarney commented 5 years ago

Ah, just confirmed that this is a documentation issue. The example in the docs doesn't call next() when it should. We probably need an else block for when ctrlKey is not pressed.