try-catch around replaceState, fixes #18
auto-update during edit (fixes #20), tab does nothing
Merge pull request #19 from ondras/master

Merge