scottcs/dot_hammerspoon

Browser module focusing on wrong space

Closed this issue · 3 comments

I have run into an odd issue with your browser module that just started happening out of the blue (possibly after the last hammerspoon update, I'm not sure).

I run both Safari and Chrome, have two monitors and multiple spaces on OS X 10.11.6. When I have the browser module enabled for both Safari and Chrome and click on a link, I end up on an empty space that has no browser windows running on it. When I return to the original space I was in, I find the link opened in the correct browser as expected.

I'm assuming this is some interaction between your module and https://github.com/asmagill/hs._asm.undocumented.spaces, but I have no idea what it could be from a quick look at the code. Any ideas?

Hmm... Do you see any errors in the Hammerspoon console? I don't use asmagill's spaces module, and I don't have more than one monitor, so I'm not able to reproduce the problem here.

You could also try doing something like setting up an application watcher for both Safari and Chrome, and have the application be "brought to front" when activated or launched (see my appwindows module). You might have to do some extra work like finding the correct space and monitor screen and switching to that first before bringing the application to front, I'm not sure.

I haven't seen any messages at all in the console.

However, not long after posting that I decided to go ahead and rebuild the spaces modules from source just in case they were out of sync with my hammerspoon after the last update or two. It seems to be behaving now, I haven't seen it go to the wrong desktop in the past few hours.

I'm going to call it a spaces issue and go ahead and close this comment. Thanks for the reply and as always thanks for some really useful modules and the module architecture!

Sure thing. I'm glad you were able to figure it out!