Fix lost focus issue when editing input fields.