Accessing the scrollTop of scrollContainer (.interface-interface-skeleton__content
) is throwing in BlockStyles
#36999
Labels
[Feature] Theme Style Variations
Related to style variations provided by block themes
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
Description
The
BlockStyles
component does some calculation to figure the right position of theBlockStylesPreviewPanelFill
. It uses thescrollTop
ofscrollContainer (.interface-interface-skeleton__content)
, which can be null at times, thus throwing an error.The bug was likely introduced in #34522. I don't fully understand the changes in #34522, but this tiny change in this line might be sufficient to resolve the issue:
Step-by-step reproduction instructions
See Automattic/wp-calypso#56922 (comment).
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
cc @ramonjd
The text was updated successfully, but these errors were encountered: