> So I hide the overlay, keep browsing, and then suddenly get redirected when it finishes?

No, it does nothing. See line 190.

I agree we should think about behavior here. I see two options:
 * we allow to hide overlay, but then display somewhere else some micro widget about uploading being in progress and a button to display overlay again
 * we prevent hiding altogether, users can use some other tab if they want to continue working anyway

I left hiding because that was how it was before, see line 103 before this pull request. So before it didn't prevent it from being hidden while uploading. But maybe you are right, we should not allow this. What do you think?