Handling layout event in Vaadin

I have a problem with Vaadin. The layout click event listener seems to consume my right clicks as well as left clicks.

I have a layout with some components inside and when I try to right click to validate my items nothing happens in the browser as the event is consumed by the code.

Is there a way to prevent grabbing the right mouse button? Thank you! Checking what was clicked inside the event does not affect the behavior. My listener;

this.addLayoutClickListener(new LayoutEvents.LayoutClickListener() {
    public void layoutClick(LayoutEvents.LayoutClickEvent event) {
            System.out.println("clicked.."  +  getSuit());
    }});

      

+3


source to share


2 answers


Seems like the answer is you can't. See: https://vaadin.com/forum/#!/thread/696409/701753



Now admittedly this is an old answer, but I just tried with vaadin7 and it seems to me that the behavior hasn't changed. This way you are left with a client-side extension if you want to change the behavior: https://vaadin.com/book/-/page/gwt.html

+2


source


If you want to check for a specific element, you can do:

In Google Chrome:



  • open Developer Tools (F12),
  • click the "Select an item on the page to test it" button. (Magnifying glass icon top left)
  • check your item.
+1


source







All Articles