valor-software / ngx-bootstrap

Fast and reliable Bootstrap widgets in Angular (supports Ivy engine)
https://valor-software.com/ngx-bootstrap
MIT License
5.53k stars 1.69k forks source link

btnRadioGroup select and arrow keys not working #5379

Open malcomm opened 5 years ago

malcomm commented 5 years ago

Bug description or feature request:

I'm using the btnRadioGroup described here:

https://valor-software.com/ngx-bootstrap/#/buttons#radio-button

When using the keyboard to select items, I expected:

  1. Space bar to select / de-select the current highlighted radio button
  2. Arrow keys to toggle the highlight

Versions of ngx-bootstrap, Angular, and Bootstrap:

ngx-bootstrap: 5.1.1

Angular: 8.2.4

Bootstrap: 4.3.1

malcomm commented 5 years ago

Note: I can kinda get this working if I structure the radio buttons more like this:

https://getbootstrap.com/docs/4.3/components/buttons/#checkbox-and-radio-buttons

But it's not perfect. Just wondering, if it might be better to follow how Bootstrap does this, with the <input> inside the <label>?