flet
flet copied to clipboard
Enable/disable right-click events on web
Discussed in https://github.com/flet-dev/flet/discussions/2719
Originally posted by mghiggins February 22, 2024
Question
I've got a flet app that includes controls that handle right-click events. It all works fine when I run it as a desktop app; but when I run it as a web app in the browser, right-clicking pops up the usual browser right-click popup menu, and the app's right-click event handler is never called. How do I make it ignore the browser's right-click handler?
Code sample
No response
Error message
No response
------------------------------------------------------
- [X] I have searched for answers to my question both in the issues and in previous discussions.
Dev Link: https://api.flutter.dev/flutter/services/BrowserContextMenu-class.html#static-methods
Dev Link: https://api.flutter.dev/flutter/services/BrowserContextMenu-class.html#static-methods
Ah ha! That looks useful - but is that exposed in flet? I searched the flet docs and didn't see any mention of BrowserContextMenu, and flet.BrowserContextMenu doesn't exist.
The link is for the dev going to work on implementing this.