Set focus to anchor only when closing via a shortcut key.
Do not initialize fields when changing an array into an object.