fix edit button for mods
Improve alt key for mouse gestures keeping state

Basically, the context menu state was being saved so long as you stayed
in the same tab, but if you moved to a different tab, who knew what the
state would be. This was wrong, so had to fix this.