Event doesn't thrown in a Dialog