Actually I tested it below it, and it works. The difference is that if bottom is below the panel, it would then return a positive value between the panel height and 5, since you are just reducing the new height which is the old height minus the JSLint panel.

I was thinking that if we actually make a new global function to show and hide panels, then we could place this code there, and have a parameter to reposition the cursor if true. Then it could work for other panels that might have the same problem as this, including some from extensions.