Keymap and multiple editors

I’m noticing that if I have multiple prosemirror editors on one page with mulitple keymap plugins that the keymap for the second editor gets called.

For instance, I have an insert palette that I trigger via Mod-; or by clicking a menu item. In one editor it has a smaller selection of items to insert (description vs body). When click the menu item I get the palette and behavior I expect. When I use Mod-; I get the palette from the second editor instance and it only works if I’ve selected that instance. Sorry if this is confusing, I’ll try to pull together a code pen.

Right, please try to reduce this to a minimal demonstration page, since I can’t really imagine it happening unless you are doing something like mutating a keymap and/or using command functions that close over stuff they shouldn’t be closing over.

I think it’s the command functions. I tore everything down to an empty MenuItem where the run just logs the view it’s called with and that works as expected. I’ll build it back up and if I hit something that’s not working as expected I should be able to pull that out to a code pen. Thank you for the help and for building this great library.