Skip to content

Conversation

@ellatrix
Copy link
Member

@ellatrix ellatrix commented May 4, 2018

Description

Currently there is an error in Firefox when moving the caret down with the arrow key, and the target block is outside of the viewport. In that case caretPositionFromPoint returns null and range.setStart fails. There will be no scrolling with a second attempt. To fix this we have to return null to prevent the error, and a second attempt will be made by scrolling the page.

How has this been tested?

See above.

Screenshots

Types of changes

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

@ellatrix ellatrix added the [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... label May 4, 2018
@ellatrix ellatrix added this to the 2.9 milestone May 4, 2018
@ellatrix ellatrix requested review from a team and aduth May 4, 2018 18:33
Copy link
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed resolves error 👍

Is there some documentation / specification that describes this behavior we could include as a reference link? Or mention that it's Firefox-specific?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Writing Flow Block selection, navigation, splitting, merging, deletion...

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants