Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NgbCheckBox autocomplete attribute support #3376

Closed
peterblazejewicz opened this issue Sep 21, 2019 · 2 comments
Closed

NgbCheckBox autocomplete attribute support #3376

peterblazejewicz opened this issue Sep 21, 2019 · 2 comments

Comments

@peterblazejewicz
Copy link
Contributor

The 'autocomplete' attribute applies to somehow closed list of interactive controls types derived from the specs group of types (text, urls, passwords, multilines, etc) and it is not yet there for checkbox, though there is a request to incorporate this:
whatwg/html#1894

https://github.com/ng-bootstrap/ng-bootstrap/blob/master/src/buttons/checkbox.ts#L22

@Directive({
  selector: '[ngbButton][type=checkbox]',
  host: {
    'autocomplete': 'off',
    '[checked]': 'checked',
    '[disabled]': 'disabled',
    '(change)': 'onInputChange($event)',
    '(focus)': 'focused = true',
    '(blur)': 'focused = false'
  },
  providers: [NGB_CHECKBOX_VALUE_ACCESSOR]
})

for the moment this attribute is a no-op here, offering no support and could mislead I think.

Thanks!

@maxokorokov
Copy link
Member

Fixed by #3377

@Kissaki
Copy link

Kissaki commented Jan 27, 2022

Note that just because it is not in the standard does not mean it is a no-op. Browsers are not consistently and completely following the HTML standard.

I am not using ng-bootstrap but I stumbled over this ticket through the referenced ticket after experiencing restoration/autocomplete behavior in Firefox (96) besides it not being in the HTML spec. autocomplete=off works despite not being listed.

So heads up, if this is still removed, and depending on context, this may lead to unintended behavior.

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

No branches or pull requests

3 participants