- From: Matt Falkenhagen <falken@chromium.org>
- Date: Fri, 28 Jun 2013 17:46:10 +0900
- To: whatwg@whatwg.org
I'm working on implementing the ::backdrop pseudo-element[1] for top layer elements such as modal <dialog> and have some questions. 1. Should ::backdrop have the same properties as a real top layer element, such as "Its containing block is the initial containing block." and "Ancestor elements with overflow, opacity, masks, etc. cannot affect it."? It seems weird if a dialog is not affected by overflow, etc. and its ::backdrop is. It also may be convenient to position and size the backdrop relative to the ICB, like <dialog>. On the other hand, perhaps it's convenient in some use cases for ::backdrop to be positioned and sized relative to the <dialog>. 2. Clicking on a pseudo-element causes a click event to be dispatched to its parent element. But this will make it unwieldy to implement behaviors like dismissing a modal dialog or "bouncing" it for attention when the area outside the dialog is clicked. Ideally you can easily determine whether the dialog or its ::backdrop was clicked. Can we perhaps use event.relatedTarget for this information? [1] http://fullscreen.spec.whatwg.org/#::backdrop-pseudo-element
Received on Friday, 28 June 2013 08:46:55 UTC