@techee I don't see a neat solution (after trying several things) apart from grabbing events so the situation in the OP doesn't happen. I shamelessly pushed to #3907 with something that seems to work for me. Note that I didn't try with a dialog popping up out of nowhere though, but I guess it would work.