Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: useColors crashes on storybook #19046

Merged
merged 1 commit into from Dec 10, 2019

Conversation

jorgefilipecosta
Copy link
Member

Description

We were verifying if a parent node exists to use a background color, but we were not verifying the node type and getComputedStyle can not be used with some node types (e.g: document).
Currently adding paragraphs or headings on the storybook playground is impossible, this PR fixes the issue by adding a simple check.

How has this been tested?

I executed npm run storybook:dev.
I opened the playground and verified I could add paragraphs and headings.

@jorgefilipecosta jorgefilipecosta added [a11y] Color Contrast [Type] Bug An existing feature does not function as intended [Block] Heading Affects the Headings Block [Block] Paragraph Affects the Paragraph Block labels Dec 10, 2019
@jorgefilipecosta jorgefilipecosta merged commit 14be12b into master Dec 10, 2019
@jorgefilipecosta jorgefilipecosta deleted the fix/useColors-crashes-on-storybook branch December 10, 2019 21:10
@youknowriad youknowriad added this to the Gutenberg 7.2 milestone Jan 6, 2020
@ellatrix ellatrix mentioned this pull request Jan 8, 2020
6 tasks
@priethor priethor added [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). and removed [a11y] Color Contrast labels Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Heading Affects the Headings Block [Block] Paragraph Affects the Paragraph Block [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants