Keymaps not working when inside customer search panel.

I created and assigned my own search panel, and it basically works.

I hit Cmd+F and the panel pops up. I enter my query and the hits are highlighted inside the document. However, if I hit Cmd+G while still being inside my search input field, it doesn’t cycle through results, but triggers the browser’s native search dialog.

If I remove focus from the panel back to the document (while the panel remains open) Cmd+G cycles through the results.

So somehow the key binding doesn’t apply to my panel. It works with the native CM6 search panel. And I wonder why.

See the runScopeHandlers call in the original panel implementation.

1 Like

I’ve overseen that. Thanks a lot!

Turned out, implementing runScopeHandlers fixes most of the missing keybindings.

But there’s still a problem regarding Mod+F. Once my panel is open, hitting Mod-F again, triggers the default browser search bar. Doesn’t matter, if search panel has focus or not.

I’ve narrowed it to openSearchPanel() returning false because getPanel returns null because view.plugin(panelPlugin) returns null.

Now I’m out of ideas, why this might be the case.

That sounds like it shouldn’t happen. Can you create a small script that reproduces this issue?

Sure. What would be best practice to provide that? Can I spawn a minimum instance of CM6 inside a JS Fiddle?

Just set something up locally and paste the JS part here as a code block, or in some paste service.