LILY-219: prevent accidental modal close when user has changed the form