Focus issues in OS X Spaces

I don't agree that this isn't a bug. There are other users complaining about the same issue here:

https://discussions.apple.com/thread/2302521?start=0&tstart=0

https://discussions.apple.com/thread/1266795?start=0&tstart=0

This is a simple version of what typically happens to me:

  1. Firefox is on Desktop/Space 1
  2. Vim and Finder are on Desktop/Space 2
  3. As I switch between Firefox and Vim (with Command-Tab), Vim will be focused correctly, but the Finder window will sometimes be on top of it, so I can't see what I'm doing in Vim

As a workaround, to save me from using the mouse I use Command-`. This will bring the focused window to the top most of the time - it is really the shortcut to switch between windows of the currently focused app.

I've posted a bug report following the link @Sidnicious lists btw.