List of steps to reproduce (step by step, including full links if applicable):
- Edit a random page using VisualEditor
- Ensure that the "Publish changes…" button is active, e.g. add some text
- Generate an automated citation using Citoid
- After the citation is generated, without clicking "Insert" switch to the source editor
What happens?:
An empty <ref /> tag is added where the citation was introduced. The empty ref does not appear if the "Publish changes…" button wasn't active.
What should have happened instead?:
- Drop the citation completely. Same behavior as when the page is saved.
Add the citation before switching.Not possible. There is not always something to add.Prompt the user to decide before switching.