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

Bug: Radio-Button change-Event IE11 vs Chrome #126

Closed
efux opened this issue Aug 12, 2019 · 4 comments · Fixed by #183
Closed

Bug: Radio-Button change-Event IE11 vs Chrome #126

efux opened this issue Aug 12, 2019 · 4 comments · Fixed by #183
Assignees
Labels
bug Something isn't working comp: lean Issues related to @sbb-esta/angular lean design comp: standard Issues related to @sbb-esta/angular standard design prio2: high Should be done as soon as possible

Comments

@efux
Copy link
Contributor

efux commented Aug 12, 2019

Describe the bug
(change)-Event behaves different in IE11 and Chrome and functionality differs from event on native radio button.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://stackblitz.com/edit/angular-sbb-uahp3d in Chrome
  2. Open Console
  3. Click on Radio Button
  4. Click on Native-Radio Button
  5. Check console, you should see 'SBB A' and 'Native A'
  6. Perform steps 1-4 in IE11
  7. Output is now undefined and 'Native A'

Expected behavior
Both browsers should behave the same way and also the SBB Radio Button should with the (change)-Event behave the same way as the native radio button.

Desktop (please complete the following information):

  • Browser IE11 vs Chrome

Additional context
If desired I can make a fix for this, however, I don't know if this is a bug or intended.

@efux efux added the bug Something isn't working label Aug 12, 2019
@kyubisation
Copy link
Collaborator

This is definitely a bug.
A PR would be appreciated. 😃

@tyzess
Copy link
Contributor

tyzess commented Sep 4, 2019

It seems as IE11 calls the (change) event before updating the [(ngModel)]....

@kyubisation The documentation (https://angular.app.sbb.ch/latest/content/radio-button) regarding sbb-radio-buttons is really weak, how should they be used with reactive forms?

@kyubisation kyubisation added comp: lean Issues related to @sbb-esta/angular lean design comp: standard Issues related to @sbb-esta/angular standard design prio2: high Should be done as soon as possible labels Sep 9, 2019
@kyubisation kyubisation self-assigned this Sep 23, 2019
@kyubisation
Copy link
Collaborator

@uzysset Currently each sbb-radio-button requires [(ngModel)] or formControlName="..." to be assigned. I'm considering adding a group component/directive and move the model connection to that.

@kyubisation
Copy link
Collaborator

@uzysset #186 adds a sbb-radio-group element, which can have [(ngModel)] or formControlName assigned to it. The documentation is also updated and extended accordingly.
The form control assignment to the sbb-radio-button and sbb-radio-button-panel is now deprecated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working comp: lean Issues related to @sbb-esta/angular lean design comp: standard Issues related to @sbb-esta/angular standard design prio2: high Should be done as soon as possible
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants