Skip to content
This repository has been archived by the owner on Jul 19, 2019. It is now read-only.

[fixed] Prevent autocomplete when clicking a non-focusable input #68

Merged

Conversation

CMTegner
Copy link
Collaborator

@CMTegner CMTegner commented Jan 5, 2016

This is to prevent autocomplete from happening when clicking a disabled input
field.

The ownerDocument check is paranoid since I couldn't find any documentation
as to when support was added to WebKit/Blink. It's in the DOM level 2 spec, so
support should be widespread.

The alternative to this fix is to explicitly check input.disabled.

http://quirksmode.org/dom/core/#t136
https://developer.mozilla.org/en-US/docs/Web/API/Node/ownerDocument

This is to prevent autocomplete from happening when clicking a disabled input
field.

The `ownerDocument` check is paranoid since I couldn't find any documentation
as to when support was added to WebKit/Blink. It's in the DOM level 2 spec, so
support should be widespread.

The alternative to this fix is to explicitly check `input.disabled`.

http://quirksmode.org/dom/core/#t136
https://developer.mozilla.org/en-US/docs/Web/API/Node/ownerDocument
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants