Closed wordpure closed 1 year ago
Can't be done. There's nothing in the API that allows the menu to be opened. All I can do is remind the user to open the sidebar
Actually, I should say it can't be done from a search reliably due to the requirement that it must be triggered by a "user action", and the search actions are too far removed from the "click" action that would get the sidebar open. I'll take a fresh look at it, but I haven't had any luck in the past.
Ok, the deal is I CAN get the sidebar to open if the search is performed from the browser context menu. It won't be opened when searching from any other menu ( quick menu, toolbar menu, page tiles, etc ... ) due to the API's "user input" requirement, which seems to be limited to clicks on the context menu and maybe a few other events. If you're using the context menu, then you're in luck. Otherwise, I'm afraid you'll have to continue opening the sidebar manually.
User actions - Mozilla | MDN mentions four user-triggered ways, the first and fourth should not work on normal web pages.
But we may be able to use context menus, such as Open in Sidebar.
Or assign a shortcut to the extension, such as Bitwarden?
Ok, the deal is I CAN get the sidebar to open if the search is performed from the browser context menu. It won't be opened when searching from any other menu ( quick menu, toolbar menu, page tiles, etc ... ) due to the API's "user input" requirement, which seems to be limited to clicks on the context menu and maybe a few other events. If you're using the context menu, then you're in luck. Otherwise, I'm afraid you'll have to continue opening the sidebar manually.
This is unfortunate news as I use the quick menu more often.
But I might be able to open the sidebar in the right-click menu instead.😁
Fix for the context menu is in the dev repo.
I'll think on whether a keyboard shortcut could be made useful. I can maybe see it working if combined with the repeat search / instant search tool ( repeat last search method + engine without a menu ). Might be sketchy on anything besides a text selection because it would rely on the element under the current mouse position. Could possibly work, though.
I submitted a PR to allow users to customize a shortcut to activate the Firefox sidebar, I believe it can simplify some sidebar operations.
Open in Sidebar
prompts me to open ContextSearch's sidebar page to view search results when the Firefox sidebar is not expanded, or when the open sidebar page is not ContextSearch.But it is troublesome to manually open the sidebar and switch to the page where ContextSearch is located. Can you improve
Open in Sidebar
so that it automatically opens ContextSearch in the sidebar when searching.