I have got a simple NSTextView inside a NSPopover. Most often selection and text editing works as suggested; i.e. i-beam cursor and current selection deselects when I click somewhere else inside the selection.
However, sometimes when the NSPopover is toggled the cursor is replaced with a pointer cursor and the selection won't disappear on click. While in this state the text is also draggable.
I want my NSTextView to behave just like in TextEdit and similar apps; the selection should never be draggable and should deselect on a single click. The cursor should also stay as i-beam.
How can I accomplish this behavior?