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

WritingFlow: Arrow keys occasionally error, do not navigate to next block #16841

Closed
aduth opened this issue Jul 31, 2019 · 2 comments · Fixed by #16846
Closed

WritingFlow: Arrow keys occasionally error, do not navigate to next block #16841

aduth opened this issue Jul 31, 2019 · 2 comments · Fixed by #16846
Assignees
Labels
[Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release

Comments

@aduth
Copy link
Member

aduth commented Jul 31, 2019

Describe the bug

In writing, I have found that sometimes pressing ArrowLeft or ArrowRight does not navigate to the previous or next blocks as I would expect them too. There is also an error logged to the console:

react-dom.165d5c53.js:283 Uncaught TypeError: Cannot read property 'right' of undefined
    at isEdge (dom.js:166)
    at isHorizontalEdge (dom.js:178)
    at WritingFlow.onKeyDown (index.js:24422)
    at HTMLUnknownElement.callCallback (react-dom.165d5c53.js:143)
    at Object.invokeGuardedCallbackDev (react-dom.165d5c53.js:193)
    at invokeGuardedCallback (react-dom.165d5c53.js:250)
    at invokeGuardedCallbackAndCatchFirstError (react-dom.165d5c53.js:264)
    at executeDispatch (react-dom.165d5c53.js:555)
    at executeDispatchesInOrder (react-dom.165d5c53.js:574)
    at executeDispatchesAndRelease (react-dom.165d5c53.js:674)

return Math.round( testRect[ side ] ) === Math.round( rangeRect[ side ] );

(last git blame #14462, cc @ellatrix @nosolosw)

To reproduce

Steps to reproduce the behavior:

  1. Navigate to Posts > Add New
  2. Click the writing prompt
  3. Press Enter
  4. Press ArrowLeft
  5. Press ArrowRight
  6. Observe the first block is still selected, an error logged to the console.

Expected behavior

The second block should be selected, and no error should be logged.

Desktop (please complete the following information):

  • OS: macOS Mojave 10.14.5 (18F203)
  • Browser: Chrome Version 75.0.3770.100 (Official Build) (64-bit)
@aduth aduth added [Type] Bug An existing feature does not function as intended [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... labels Jul 31, 2019
@ellatrix ellatrix self-assigned this Jul 31, 2019
@ellatrix
Copy link
Member

Curious that none of the e2e tests fail. I'll have a look.

@ellatrix
Copy link
Member

Looks like, in case of an empty paragraph, the buttons on the side are in the way, and applying a z-index doesn't get them out of the way.

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jul 31, 2019
@ellatrix ellatrix added the [Type] Regression Related to a regression in the latest release label Aug 1, 2019
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... [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants