Skip to content

Commit

Permalink
feat: change autocomplete from 'off' to 'nope' (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdwvit authored and Haroenv committed Dec 4, 2018
1 parent 1f070a8 commit fbbed04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/autocomplete/typeahead.js
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ function buildDom(options) {
.prop('readonly', true)
.attr({
'aria-hidden': 'true',
autocomplete: 'off',
autocomplete: 'nope',
spellcheck: 'false',
tabindex: -1
});
Expand All @@ -563,7 +563,7 @@ function buildDom(options) {
$input
.addClass(_.className(options.cssClasses.prefix, options.cssClasses.input, true))
.attr({
autocomplete: 'off',
autocomplete: 'nope',
spellcheck: false,

// Accessibility features
Expand Down

3 comments on commit fbbed04

@SchmidtDawid
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But why? My page had bug with it and for example https://www.lacoste.pl/ had the same bug right now. Nope is not correct value.

@Haroenv
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It wasn't a correct value on purpose so that it would not auto complete (be associated with an unknown key).

However it seems like this is really tricky behaviour and if this fix is causing more issues this probably should be reverted.

Can you see an autocomplete prompt change between the two versions?

@SchmidtDawid
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With "nope" autocomplete is appearing over algolia-autocomplete like here: https://www.aptekagemini.pl/ (change is not on production yet). Same issue on Lacoste site. On chrome browser of course. Change "nope" on "off" fix the problem in my case.

Please sign in to comment.