flutter-context-menu icon indicating copy to clipboard operation
flutter-context-menu copied to clipboard

Second click required to open menu

Open Solido opened this issue 4 years ago • 2 comments

Hello, thanks for this package that I am exploring !

Tried a basic text adding menu to item on a columns

When a context menu is open and I right click another entries, instead of opening a new context and closing the previous one, it first close the first menu then another clic is required to open a new context.

Still exploring this package maybe I miss a parameter.

Cheers

Solido avatar Jun 18 '21 18:06 Solido

Unfortunately it is only possible to open the menu using left click or long tap.

return GestureDetector( behavior: HitTestBehavior.translucent, onSecondaryTap: showMenu, onLongPress: enableLongPress ? showMenu : null, child: child, );

It would be very nice if there was an option to show the context menu on a normal tap as well.

ARau87 avatar Jul 30 '22 12:07 ARau87

Thanks for the report, the issue is that the layer that capture clicks for close is layered above any other context regions.

We could add a parameter to disable this layer, but then you would have to manage the close call yourself. Probably by adding your own container that sits underneath all the regions and calls ContextMenuOverlayState.of(context).hide()

esDotDev avatar May 28 '24 18:05 esDotDev