Initial fix for insert image action

The same bug exists as with "insert link" action; when clicking outside
the modal it closes but the shade stays and the form can no longer be
interacted with.