Skip to content

Take <select multiple> into account in obscured element test#894

Merged
shs96c merged 1 commit intow3c:masterfrom
andreastt:obscured-select-multiple
Apr 19, 2017
Merged

Take <select multiple> into account in obscured element test#894
shs96c merged 1 commit intow3c:masterfrom
andreastt:obscured-select-multiple

Conversation

@andreastt
Copy link
Member

@andreastt andreastt commented Apr 17, 2017

As the options of a <select multiple> are painted and represented as DOM
elements, the center point would end up targetting one of the <option>
elements. We can take this into account by using select.contains(option).

If the first pointer-interactable paint tree element is itself, this is
also passes the check, since the DOMElement.contains(otherEl) performs
an inclusive descendant check. This means element.contains(element)
is true.


This change is Reviewable

@andreastt andreastt added the bug label Apr 17, 2017
@andreastt andreastt added this to the Level 1 milestone Apr 17, 2017
As the options of a <select multiple> are painted and represented as DOM
elements, the center point would end up targetting one of the <option>
elements.  We can take this into account by using select.contains(option).

If the first pointer-interactable paint tree element is itself, this is
also passes the check, since the DOMElement.contains(otherEl) performs
an _inclusive_ descendant check.  This means element.contains(element)
is true.
@shs96c
Copy link
Contributor

shs96c commented Apr 19, 2017

I _ think_ this makes sense. Will correct the typos once the merge is in.

@shs96c shs96c merged commit 654adbb into w3c:master Apr 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants