Closing an editor with a dirty state (unsaved changes) will show a modal, asking the user if they want to save or leave without saving the document. The modal currently focuses the "Don't save" button initially, which is suboptimal since one single keypress might discard all the changes.
Steps to reproduce
Open a text document with the text editor app
Change something, don't save
Hit the "back"-button in your browser
Hit enter as soon as the modal shows
Expected behavior
The document should be saved and closed.
Actual behavior
The document is not being saved.
Note that we can only fix this for our own modal which shows when e.g. hitting the "back"-button in the browser or when closing the editor via the app bar. Closing the browser tab/window creates a browser popup which we can't control.
Describe the bug
Closing an editor with a dirty state (unsaved changes) will show a modal, asking the user if they want to save or leave without saving the document. The modal currently focuses the "Don't save" button initially, which is suboptimal since one single keypress might discard all the changes.
Steps to reproduce
Expected behavior
The document should be saved and closed.
Actual behavior
The document is not being saved.
Note that we can only fix this for our own modal which shows when e.g. hitting the "back"-button in the browser or when closing the editor via the app bar. Closing the browser tab/window creates a browser popup which we can't control.