As I mentioned in your gist, I don't think this is the best way to do it, since if you have for example the find in files panel open and the scroll behind it, so for the user is not in the view, and then the JSLint panel pops up, and that cursor not in view ends up in the view.