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
toggleClass() requires a boolean value, not just a truthy/falsy one.
When readonly is null, the current code results in the read-only class
being toggled (since null is treated the same as the argument not being
provided), resutling in indeterminate results depending on what the
previous value of readonly was.
To avoid this surprising behavior, just coerce the value of readonly to
a boolean before passing it to toggleClass(), so that null will always
result in no read-only class, same as if the readonly attribute was not
provided.
0 commit comments