Skip to content

Update gesture code to check for IContextMenu #8842

@maribethb

Description

@maribethb

Check for duplicates

  • I have searched for similar issues before opening a new one.

Problem

No response

Request

The current gesture code currently checks a specific set of objects and calls the showContextMenu function for the object if it is what was right-clicked on.

Instead, the gesture code should:

  • Check what is currently focused (this assumes that Make "right click" change the focus to the thing that was right-clicked on #8840 is complete)
  • Check if the currently focused thing implements IHasContextMenu
  • If it does, call its showContextMenu function and stop propagation of the event. If it doesn't, do nothing and don't stop propagation since the click wasn't handled.
  • The current calls to bringBlockToFront and hideChaff should be moved into their respective objects' implementations of showContextMenu since the handling depends on that specific object, and there's no reason for the gesture code to know about it.

Alternatives considered

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

issue: feature requestDescribes a new feature and why it should be added

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions