Bug 879291 - [SMS] Properly exit edit mode before transitioning to another panel - r=gnarf

Closes gh-10208