Forcing the caret mode to false on the quit hook does not work.
Enforce the caret mode deactivation at selection time.