Skip to content

Fix for no autocomplete for Typeahead Select#6623

Merged
tlabaj merged 1 commit intopatternfly:mainfrom
jeff-phillips-18:select-auto-complete
Nov 19, 2021
Merged

Fix for no autocomplete for Typeahead Select#6623
tlabaj merged 1 commit intopatternfly:mainfrom
jeff-phillips-18:select-auto-complete

Conversation

@jeff-phillips-18
Copy link
Member

@jeff-phillips-18 jeff-phillips-18 commented Nov 18, 2021

What:
Fixes #6625

Fix to not show the auto complete form for the TypeAhead Select component on Chrome

@patternfly-build
Copy link
Collaborator

patternfly-build commented Nov 18, 2021

@tlabaj tlabaj merged commit ccf6bfe into patternfly:main Nov 19, 2021
@patternfly-build
Copy link
Collaborator

Your changes have been released in:

  • eslint-plugin-patternfly-react@4.14.8
  • @patternfly/react-catalog-view-extension@4.26.8
  • @patternfly/react-charts@6.28.8
  • @patternfly/react-code-editor@4.16.8
  • @patternfly/react-console@4.26.8
  • @patternfly/react-core@4.175.8
  • @patternfly/react-docs@5.36.8
  • @patternfly/react-icons@4.26.8
  • @patternfly/react-inline-edit-extension@4.20.8
  • demo-app-ts@4.135.8
  • @patternfly/react-integration@4.137.8
  • @patternfly/react-log-viewer@4.20.8
  • @patternfly/react-styles@4.25.8
  • @patternfly/react-table@4.44.8
  • @patternfly/react-tokens@4.27.8
  • @patternfly/react-topology@4.22.8
  • @patternfly/react-virtualized-extension@4.22.8
  • transformer-cjs-imports@4.13.8

Thanks for your contribution! 🎉

@garrett
Copy link

garrett commented Jan 5, 2022

This change specifically makes it so we do experience browser autocomplete on top of PatternFly autocomplete. In other words, this change is a breaking one that actually does the opposite of what is intended.

There's no "never" attribute listed on any documentation or spec pages, but there is an "off", which is suggest to be used in cases where autocomplete is not wanted. (The exception is user/pass forms where password managers still work with "off", but this isn't for autocomplete in most cases. In that specific case, it's suggested to use "new-password"... and this wouldn't be case for the typeahead select, unless it's used for user selection. And it usually isn't used for user selection.)

  • https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete

    "off"

    The browser is not permitted to automatically enter or select a value for this field. It is possible that the document or application provides its own autocomplete feature, or that security concerns require that the field's value not be automatically entered.

  • https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill

    When wearing the autofill expectation mantle, the autocomplete attribute, if specified, must have a value that is an ordered set of space-separated tokens consisting of either a single token that is an ASCII case-insensitive match for the string "off", or a single token that is an ASCII case-insensitive match for the string "on", or autofill detail tokens.

@garrett
Copy link

garrett commented Jan 5, 2022

Note: It might have been the case that in testing, both user and automated, that it does seem to pass on the first time with "never", but then a second go would autocomplete a "never" type of autocomplete.

The correct solution would be to:

  1. Revert this PR to unbreak the typeahead select in all general cases.
  2. Add a workaround for the typeahead user case (or an option to switch), using either a hardcoded "new-password" or a custom value as the value instead of "off".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TypeAhead Select shows autocomplete popup in Chrome

5 participants