MozillaReality / horizon

(2015) Horizon was an experimental VR browser built on web standards using CSS-VR.
http://mozvr.github.io/horizon/web/
Other
1 stars 0 forks source link

Figure out how to trigger pseudo-classes (`:hover`, `:active`) in iframe content #169

Open cvan opened 9 years ago

cvan commented 9 years ago

see this conversation

if we were privileged to use Components.utils, we could use something like addPseduoClassLock (which is what the DevTools uses to toggle :hover, :active states in the document).

cvan commented 9 years ago

so if we can't use privileged Firefox internals, this is the hack to make it work (since getComputedStyle won't work):

http://stackoverflow.com/a/12629050 http://stackoverflow.com/a/11495671

cvan commented 9 years ago

@kevingrandon: do you know how we would go about doing this in Gecko/extension land - to get those trusted events?

KevinGrandon commented 9 years ago

Not off the top of my head. Might we worth talking to some DOM guys to see if this is something we should build an API for?

cvan commented 9 years ago

supposedly we can add-ons can fire trusted events. we should just figure out how we can do that from an add-on in Horizon. should talk to DOM folks.

cvan commented 8 years ago

I don't know how I forgot, but Pointer Events are a thing.

cvan commented 8 years ago

and it looks like, when implemented, Pointer Events (bug 822898) will trigger :hover on pointerenter (and dismiss on pointerleave), if I'm infering correctly from the spec. I'm not sure, but I'd assume that :active also gets triggered correctly.

/cc @caseyyee check it out! :tada: now to just wait for platform support… (GD, IE 11!)

caseyyee commented 8 years ago

Looks like there are even r+'d patches for this work. For some reason the work has been at a standstill since. We'll want to call this out and see if we can get any traction on getting this going again.