Fixes back button from edit document

Closes COUCHDB-2427