Skip to content

Patch for Chrome 105 bug concerning sticky positioning

Devon Govett edited this page Sep 10, 2022 · 16 revisions

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 React Spectrum:

Upgrade to @adobe/react-spectrum@3.21.2 to pull the temporary fix which disables the sticky positioning for Chrome/Edge v105 only.

Using resolutions (yarn)/overrides (npm):

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"
}

Using patch-package:

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)

  1. Run yarn add patch-package --dev
  2. Edit node_modules/@react-stately/layout/dist/module.js
  3. Find instances of isSticky = and comment out the line.
  4. Run yarn patch-package @react-stately/layout
  5. 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.

FAQs

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.