Fix corner grab for firefox

Amend 848baf7d1faa483d9909497af16dc461f2767b92 to fix the bug in Firefox 28. I'm not sure it's the best way to do that but it works well in Firefox, Chromium and Opera on Ubuntu.