Adjust how the focus reset is handled so that it works when editing an external image.
Add missing </div>
Switch to using a .hidden class instead of .hide()/.show() so that the input doesn’t get set to display: inline-block

When editing an external image with a custom url, the field would be set to display:inline-block which broke the layout a bit.