Sergey Ilinsky
Sergey Ilinsky

Reputation: 31535

How to determine whether click happened on element's scrollbar or on its content

There is indeed method element.componentFromPoint(iCoordX, iCoordY) in Internet Explorer, but how do I differentiate a mouse click occurred in the content area of an element from the click occurred on its scrollbar in other browsers?

Upvotes: 2

Views: 725

Answers (1)

Sergey Ilinsky
Sergey Ilinsky

Reputation: 31535

In Gecko-based browser it is possible to check on event.originalTarget. If click happened on element's scrollbar this property will have a XULElement object returned.

WebKit and Presto to go...

Upvotes: 3

Related Questions