You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check for an input name based on whether it has the property "readOnly" and the value is false instead of checking for element names. It's both faster and more accurate.
The text was updated successfully, but these errors were encountered:
Actually, it seems like the most accurate way to detect a form element is to check if it has the "disabled" property (disregarding the value as disabled elements can't receive events).
Originally I was going to check for a readOnly element, but Firefox lets you move the cursor around in a readOnly element, so that seems useful to preserve.
mojavelinux
changed the title
Check for readOnly property instead of specific element names
Check for form elements by property instead of specific element names
Aug 14, 2015
To clarify, select elements don't have the readOnly property (if you can't believe it) which is why we can't use it. Clearly we can't agree on a single definition of read only in HTML :)
Check for an input name based on whether it has the property "readOnly" and the value is
false
instead of checking for element names. It's both faster and more accurate.The text was updated successfully, but these errors were encountered: