Skip to content

feat(ContextMenu): context menu should be invisible while scrolling #7821

@peereflits

Description

@peereflits

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

AS as user on a mobile dvice
THAT uses an app
THAT is build with BootstrapBlazor
THAT has a context menu
I WANT the context menu to be invisible while I'm scrolling through my app
SO I don't be distracted (and misinformed) by the context menu

Description

I work on a .NET MAUI app that has on several pages a context menu.
The context menu currently appears on a right-mouse click, or a tap-and-hold (after X ms, see OnTouchDelay in BootstrapBlazor.Components.ContextMenuTrigger).
But when a user taps a page (with a context menu) and starts scrolling (while holding the finger on the page) the context menu appears. And it appears on a location where the finger of the user (while he/she scrolls) isn't anymore.
This gives an odd experience.

See the video below.

567463645-0edabfc3-8c14-4047-92fb-82a7793bb36b.mov

Note: I have not searched the existing issues, as I can't read Chinese

Describe the solution you'd like

Provide a property that allows to override the default behaviour.
I propose, in ContextMenuTrigger a [parameter] property bool IsInvisibleOnTouchMove (default false because that is the current behaviour).

I'll create a PR with a proposed solution.

Additional context

This issue is relevant on touch-enabled devices (phone/tablet) like in a .NET MAUI project.
The solution should not affect current mouse events.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions