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
Merge pull request #1287 from ricksladkey/fixes-select-after-disabled

Handle active selection after being disabled