Close editor when the user navigates away

(Quick) Fixes #1403