Browser Event- Change position of images etc


Might be a lame question, but please do advise me

Such type of sites are possible making using Vaadin UI?

I am struggling with finding the scroll event for quite a long time now.

Need to have some more ‘Only front-end’ operations.

Can someone suggest me please?
Looks like Vaadin 14 changes have removed quite some handler and components.


Hi Somendu,

I think you’re in the wrong forum. :slight_smile:

Yes, you can do that with Vaadin. I’d start with reading this:

You can add event listeners with component.getElement().addEventListener(...).

Sorry Joacim, but wrong is your answer.

You should have provided working code that catches scroll events in Vaadin. I would also benefit from that, as I’m not able to find out how to catch them.

component.getElement().addEventListener(…) does not work.

– edit –
looks like I was exhausted from finding the solution for scroll event when I wrote previous comment. There is no exact Vaadin method, like addScrollListener. You have to find you exactly, which component are you scrolling. Then you register listener on that component as Joacim wrote component.getElement().addEventListener("scroll", event -> { ... });