try-catch around replaceState, fixes #18
auto-update during edit (fixes #20), tab does nothing