Use of first client rect to determine click coordinates

As I was working on to reduce
the definitions of what coordinates should be clicked or be tested for
pointer-intractability, it occurred to me that we only use the first
DOMRect returned from Element.getClientRects().

For reference, I found this article provides a good graphical
introduction of client rects and their meaning:

Would it not be possible for the first rectangle to be outside the
viewport after scrollIntoView has been called, as it operates on the
centre point of the bounding client rect?

In which case a more reliable approach would be to use the first of
_any rects_ from the sequence that is in-view.

Received on Monday, 8 August 2016 19:47:51 UTC