Fixed mouse events on dialogs.