I’ve a text field which implements ClickNotifier.
If I click tt works fine.
If I rigth click on it the clickEvent is not issued or not sent to the listener and the standard Windows context menu is opened.
What’s I forget ?
Should be enabled in some way ?
Tks
Right click is not a regular click event but instead a contextmenu
event. And you need to do preventDefault
on it to prevent the context menu from opening. And users will probably hate it since there are lots of legitimate reasons for using the context menu.
preventdefault is a method of what class.
I didn’t find it in contextmenu object in V23
There’s no high-level Java API for generic context menu event handling but you can do it through the low-level Element
API.
Sorry but I lost myself.
Now I created a contextmenu using as target my VerticalLayout, I added items as wanted but when Iright clicking on the layout I still see the browser standard context menu and not mine.
Could You suggest why ?
Tks
Would be easier to make any guess if you would share the relevant parts of the code you’ve written.