-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix kb types #145
base: master
Are you sure you want to change the base?
Fix kb types #145
Conversation
Hey! Not related to the repo but i'm using plain CodeMirror inside a TS/React project and i'm trying to attach a function to the on('keydown') method: codeMirror.on("keydown", handleKeyDown); But i'm getting this:
I used the same interface as you in my handler: const handleKeyDown: DomEvent<KeyboardEvent> = (instance, event) => {...} Def: interface DomEvent<T extends Event = Event> {
(editor: CodeMirror.Editor, event: T): void;
} This PR was enough for you to fix it? Some ideas on why it's not working for me are going to be highly appreciated 🙏 |
@gonzarodriguezt this was the same issue I had. This PR fixes it. |
@andyrichardson @grdnrt I am a lot shorter on time these days as when I started this project. Codemirror & React APIs are moving to quickly for me to keep atop of for the day-to-day. I am looking for a co-maintainer of this project. Please contact me directly if you are interested. Thank you for understanding. |
@andyrichardson do you mind doing a pull from master to resolve conflicts? Then I'll merge this! |
For sure, I'll take a quick look some time today |
Fix #144
Events have been determined by referring to the MDN docs.