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

Syntax Error in the useHTMLClass causes Unexpected Error in older Safari #20504

Closed
cwood821 opened this issue Feb 27, 2020 · 2 comments · Fixed by #20507
Closed

Syntax Error in the useHTMLClass causes Unexpected Error in older Safari #20504

cwood821 opened this issue Feb 27, 2020 · 2 comments · Fixed by #20507
Assignees
Labels
[Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@cwood821
Copy link
Contributor

Describe the bug
A Syntax Error in the useHTMLClass hook causes the editor to show recovery options. I'm seeing this on Safari 12.1.1 on Mac OS Mojave. Coworkers on newer Safari (13+) do not have the same error.

The syntax error right here where the selector is missing a closing ) seems to be the root problem. Other browsers evaluate that selector without error, but older versions of Safari do not.

To reproduce
This specifically applies to WordPress 5.4 Beta 2 on older versions of Safari.

Steps to reproduce the behavior:

  1. Go to Add New Post in Safari 12.1.1 (or earlier version)
  2. See error

Expected behavior
Rendered Gutenberg editor should show

Screenshots
unexpected_error

Desktop (please complete the following information):

  • OS: macOS Mojave
  • Browser: Safari
  • Version: 12.1.1

Smartphone (please complete the following information):

  • Have not tested on mobile Safari

I'd be happy to open a PR, but would need some guidance on base and target branches.

@aduth aduth added the [Type] Bug An existing feature does not function as intended label Feb 27, 2020
@aduth
Copy link
Member

aduth commented Feb 27, 2020

Introduced in #20245 (cc @jorgefilipecosta)

@aduth
Copy link
Member

aduth commented Feb 27, 2020

Pull request: #20507

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Feb 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants