W3C home > Mailing lists > Public > www-style@w3.org > January 2012

[css3-regions] How should elementFromPoint interact with Regions?

From: Chris Jones <cjon@microsoft.com>
Date: Mon, 23 Jan 2012 17:48:32 +0000
To: "www-style@w3.org" <www-style@w3.org>
CC: Alex Mogilevsky <alexmog@microsoft.com>, Sylvain Galineau <sylvaing@microsoft.com>
Message-ID: <314AEA692CE6754A854276304D0CD6C0091BD2B6@TK5EX14MBXC290.redmond.corp.microsoft.com>

We've recently started to examine what happens when the Javascript OM call elementFromPoint [1] interacts with CSS Regions [2]. 

In IE's current implementation, the displayed elements in a region are in a separate child document from the surrounding content, and, from an object model perspective, the elements that act as regions have no content of their own. This makes hit testing for elementFromPoint potentially difficult.

We therefore suggest that if elementFromPoint(x,y) is called from a parent document and hits an element in a child document (e.g. displayed in a frame or region), an appropriate element from the parent document should be returned.  If the document is being displayed via an iframe or frame element, return that element.  If the document is being displayed via a region, return the region displaying the document.

Alternatively, a single-document implementation of regions should return the hit-tested element at the given coordinates. 

Any thoughts, opinions, or other suggestions for additional approaches are welcome. 



[1] http://www.w3.org/TR/cssom-view/#dom-document-elementfrompoint
[2] http://dev.w3.org/csswg/css3-regions/
Received on Monday, 23 January 2012 17:49:27 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:10 UTC