Skip to content Skip to sidebar Skip to footer

Why Is Ios Not Showing Keyboard For Input After Js Has Unset A Readonly Tag?

I have a UITextField in HTML form set to readonly. Upon entry javascript should test if the field is currently being edited by someone else, if not the readonly will be set to fals

Solution 1:

The form element should not already have the focus when changing the readOnly in order to make iOS Safari register the changed status.

On-Screen keyboard will now show as expected.

functionpreCheckField(field, form) {
  if (field.readOnly) {
    field.blur(); // iOS needs this before a change of the readOnly// ses = "<?php echo $session['ukey']; ?>';// res = getAccessRequest(field.id, form.id, ses);// server side check before entry is skipped for this test// assuming entry was allowed by getAccessRequest readonly can be unset
    field.readOnly = false;
    dev_div = document.getElementById('dev_message');
    message = (field.id + " can now be modified");
    dev_div.innerHTML = dev_div.innerHTML + "<br>" + message;
    field.focus();
  }
}

Post a Comment for "Why Is Ios Not Showing Keyboard For Input After Js Has Unset A Readonly Tag?"