Added JS fixes for handling the text input field.