Handle active selection after being disabled

- Choose appropriate mode upon being re-enabled
- Record previous mode as normal instead of disabled when switching
- Add unit tests for disabled mode and active selection