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

Keyboard nav allows creation of comments that can't be accessed by mouse #172

Open
microbit-matt-hillsdon opened this issue Jan 21, 2025 · 2 comments

Comments

@microbit-matt-hillsdon
Copy link
Contributor

You can't normally create a comment here but you can with the keyboard access to the context menu:

Image

...but then you can't access it as a mouse user.

It can't be interacted with as a keyboard user either but that feels more of a limitation to be addressed, whereas the mouse issue is more awkward.

@rachel-fenichel
Copy link
Contributor

Some related comment-creation tests in scratch:

Image

And you actually can also put a comment on a single-field block in MakeCode right now, and then can't click on it because the click opens the field editor.

Image

However, if you right-click anywhere on this block, including on the shadow blocks (0 and 1) the comment is applied to the parent block:

Image

@rachel-fenichel
Copy link
Contributor

There are two possible bugs here:

  1. The way we're triggering the context menu on a shadow block uses that block instead of its parents for actions, including add comment. Normally the code in [Gesture.setTargetBlock](https://github.com/google/blockly/blob/develop/core/gesture.ts#L1042) directs actions to the parent block.
  2. The precondition for the add comment action in the context menu needs to be stricter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

2 participants