File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
plugins/woocommerce/client/blocks/assets/js/blocks/mini-cart Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -191,17 +191,16 @@ store< MiniCart >(
191
191
192
192
disableScrollingOnBody ( ) {
193
193
const { isOpen } = getContext < MiniCartContext > ( ) ;
194
- const { body } = document ;
195
- const scrollBarWidth =
196
- window . innerWidth - document . documentElement . clientWidth ;
197
-
198
194
if ( isOpen ) {
199
- Object . assign ( body . style , {
195
+ Object . assign ( document . body . style , {
200
196
overflow : 'hidden' ,
201
- paddingRight : scrollBarWidth + 'px' ,
197
+ paddingRight :
198
+ window . innerWidth -
199
+ document . documentElement . clientWidth +
200
+ 'px' ,
202
201
} ) ;
203
202
} else {
204
- Object . assign ( body . style , {
203
+ Object . assign ( document . body . style , {
205
204
overflow : '' ,
206
205
paddingRight : 0 ,
207
206
} ) ;
You can’t perform that action at this time.
0 commit comments