tconfrey / BrainTool

A better way to manage Tabs, Links and Notes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature to bring BrainTool window to "top" from extension menu

paul-bjorkstrand opened this issue · comments

If the BrainTool window is already open, then there is no way to bring it to the top without cycling to the window. Since the window is critical to the management and access of BrainTool data, there should probably be an easy way to bring that window to the top and into focus.

I am not sure if such a thing is possible with a chrome extension, but it would be worth investigating. In plain JS, this would be trivial: https://stackoverflow.com/questions/7174222/select-and-focus-an-already-existing-window. Another way may be to keep the reference to the window

A chrome extension may have more to it, but it would be a really useful feature.

Thanks @paul-bjorkstrand this is a good suggestion and one that I've wanted to implement. Unfortunately it's non-trivial in the context of an extension. You only get a single key command to invoke the extension and thats needed to open the popup. I experimented with popping the BrainTool window to the top when the popup opens but that closes the popup!

I did find a suggestion in the answer to this question that might help: https://stackoverflow.com/questions/40327403/multiple-keyboard-shortcuts-for-chrome-extensions-popup
I'll look in to whether I can implement a kind of double-click whereby hitting Option-b (the default BT invocation key) twice would flash the popup open, surface the BT window, and then close the popup.

Hi @paul-bjorkstrand ,
The 0.7.0 version, which just went live, addresses this issue. Now option-b opens the extension popup as before but if you immediately hit b again the BrainTool side panel will be brought to the top. I've been using this functionality during development and find it pretty intuitive to double tap the b to get to BrainTool. LMK what you think and thanks again for the great suggestion!
Tony