Added delay in ClosePopupOnMouseDown feature

I know it's an ugly fix, but it allows me to handle button clicks on popup views. It works great, so please accept it :-)