We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28a2aa8 commit 4dc5cbeCopy full SHA for 4dc5cbe
packages/focus/src/index.js
@@ -199,8 +199,18 @@ function disableScrolling() {
199
let paddingRight = document.documentElement.style.paddingRight
200
201
let scrollbarWidth = window.innerWidth - document.documentElement.clientWidth
202
+ let scrollbarGutter = window.getComputedStyle(document.documentElement).scrollbarGutter
203
204
document.documentElement.style.overflow = 'hidden'
205
+
206
+ // null change to trigger gh action
207
208
+ if (scrollbarGutter && scrollbarGutter !== 'auto') {
209
+ return () => {
210
+ document.documentElement.style.overflow = overflow
211
+ }
212
213
214
document.documentElement.style.paddingRight = `${scrollbarWidth}px`
215
216
return () => {
0 commit comments