-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Patch for Chrome 105 bug concerning sticky positioning
The latest release of Chrome and Edge (v105 and above) contains a bug that causes the page to crash when using sticky positioning. This affects React Spectrum v3 TableView with checkbox selection and scrolling. React Spectrum has released a patch to temporarily remove the sticky positioning from TableView in affected versions of Chrome/Edge. Once Chromium releases a fix, we will re-instate sticky positioning. ** Please note this only affects TableViews with checkbox selection enabled.
Options for teams to fix:
Upgrade to @adobe/[email protected]
to pull the temporary fix which disables the sticky positioning for Chrome/Edge v105 only.
If you cannot update all React Spectrum components, you can update just TableView using package manager resolutions/overrides.
For yarn, add the following to your package.json:
"resolutions": {
"@react-spectrum/table": "3.3.2"
}
or for npm:
"overrides": {
"@react-spectrum/table": "3.3.2",
"@react-stately/layout": "3.7.1"
}
If you are on an old version of TableView and you cannot update to the latest, you can use patch-package to patch your current version using one of the options below.
Turn off sticky positioning for all browsers (easiest)
- Run
yarn add patch-package --dev
- Edit node_modules/@react-stately/layout/dist/module.js
- Find instances of
isSticky =
and comment out the line. - Run
yarn patch-package @react-stately/layout
- Add
"postinstall": "patch-package"
to "scripts" in package.json.
Turn off sticky positioning for Chrome/Edge v105+ only
Please refer to our PR for the code changes needed.
Q: How do I know if we are affected?
A: You are affected if you are using React Spectrum v3 TableView with checkbox selection. If you scroll a TableView that has checkbox selection enabled on the latest version of Chrome/Edge (v105+), the page will crash.
Q: Are other components affected?
A: No other components are affected as far as we are aware.
Q: When will this be fixed in Chrome?
A: Unknown. Follow this bug report for updates.