ni / nimble

The NI Nimble Design System
https://nimble.ni.dev
MIT License
29 stars 9 forks source link

Table select via keyboard sometimes behaves as if Shift is pressed when it isn't #2222

Open jattasNI opened 4 days ago

jattasNI commented 4 days ago

🐛 Bug Report

In the SLE files app if I use keyboard navigation to select a table row, it sometimes behaves as if Shift is pressed (selecting multiple rows with a single checkbox toggle) even when it isn't.

I saw this a couple times in macOS Firefox but then after refreshing the page I haven't been able to reproduce it. I tried in other browsers and in Storybook and wasn't able to reproduce there.

I'd recommend we do some code inspection to see if we can hypothesize any way that this could happen and that another person try to reproduce it too. If we find something then great, if not I have no problem closing this with no changes.

💻 Repro or Code Sample

https://dev.lifecyclesolutions.ni.com/files/

  1. tab to the table
  2. arrow to a row's selection checkbox
  3. space to toggle it
  4. arrow to a different row that's a few rows away
  5. space to toggle it

🤔 Expected Behavior

  1. the new row is selected but the ones in between aren't

😯 Current Behavior

  1. sometimes all the rows in between are selected

💁 Possible Solution

🔦 Context

https://dev.lifecyclesolutions.ni.com/files/

🌍 Your Environment

macOS Firefox

fredvisser commented 4 days ago

I could also reproduce it in Safari - it seemed 100% reproducible if I selected the row with the checkbox focus vs selecting when the whole row was focused, but it's also no longer reproducible for me as well 🤷‍♂️

https://github.com/ni/nimble/assets/1458528/38ee1650-9d40-430e-9d43-3ab286058c58

https://github.com/ni/nimble/assets/1458528/c0361b7b-7cb3-4e1b-a0c7-6d03c07299aa