reset caret and prevent certain drop events