Question

We have a Firefox extension that injects a div into the page. The div has a Z index of 2.14748e+9 (i.e. the highest allowed value). One site (parse.com) displays a modal Login dialog by putting a grey overlay over the whole page (absolute positioned).

Despite the fact that the z index of the overlay is lower (and so the div is not greyed out), the select field in the div does not open when clicked. If I right click on the field then the context menu appears, and after that it can be opened with a click as expected. So this looks to be some kind of focus issue.

All of this works fine in Chrome.

Update: Even when I delete the overlay div the input fields in the injected div fail to get keystrokes, so it looks like the modal dialog is capturing the events.

Was it helpful?

Solution

So it turns out the z-index of the injected div was causing the problem. Any value of 9999995 or greater (no really!) prevents it from gaining focus. Unless I'm missing something, this seems like a bug to me, so I filed it in Bugzilla.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top