Skip to content

rangeCount checking is required before calling getRangeAt() in safari. #36

@phruse

Description

@phruse

WordPress Editing Mode
Gutenberg

Frontend or Backend Issue
Backend Issue

To Reproduce
when clicking on inline code area is displayed that “This block has encountered an error and cannot be previewed.”.

Screenshots
스크린샷 2022-03-09 오전 12 48 35

Modify
resources/gutenberg/enlighterjs.gutenberg.min.css

... ,t=e&&e.getRangeAt(0), ...

to

... ,t=e&&e.rangeCount>0&&e.getRangeAt(0), ...

Now it will work in safari! 😄

Desktop (please complete the following information):

  • OS: macOS
  • Browser: safari
  • Version: 15.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions