Issue #5 partially solved: it goes back selecting the correct tab only when user decide to edit an element.