Fixes cursor visibility in dialogs