Browser's scroll down changes getClientY() return value


I am getting a strange behaviour from my portlet.
I debugged my code and I noticed that while I am scrolling down/up the page, the
method returns different values …

Plus the
method always returns -1.

Any idea ?

I have few more clues.
Now I know that I must use the getRelativeY/getRelativeX to get the position inside my portlet’s layout.

The thing is that these methods seem to work only for some kind of component :