Steps to Reproduce:
- Open any page in VisualEditor.
- Go to Insert > Reference to add a reference. Do NOT click inside the reference box.
- Go to Insert > Template to add a template.
You can't add a template, you can't exit the dialog, you can't do anything except close the browser tab and lose all of your work.
This cannot be reproduced in Safari. This cannot be reproduced if you first click inside the reference box.