fix(view): don't affect history when inside a modal

Closes #1667