xul:browser with an iframe - multiple inputs elements get focus at the same time

Jason Riffel <[email protected]>
Newsgroups gmane.comp.mozilla.devel.xpfe
Message-ID <CAHm2GdkJMs0w82nZwM0Fks-TR3wZHDwB7iGX0pm5+45sPdskAw@mail.gmail.com>
Has anyone ever had a problem with an input element inside an iframe
receiving focus at the same time with another element outside the iframe?
When this happens all keypress events are sent to the input element which is
not in the iframe.

Consider this pseudo markup:

<xul:browser>
  <input id="foo" />
  <div class="floatingpanel">
    <iframe>
      <input id="bar" />
    </iframe>
  </div>
</xul:browser>

1) Assume div.floatingpanel is a CSS based popup dialog (YUI panel)
2) Click input#foo and it gains focus
3) Click input#bar and it gains focus
4) input#foo never loses focus - now I have two inputs with focus
5) All keypress events go to input#foo

I only see this in my application when the iframe is on a CSS based popup
dialog (YUI panel specifically).  This makes me think it is some kind of
weird z-axis bug or positioning defect with iframes and focus.  Looking for
a way to work around if anyone has any experience with this problem?

I upgraded to xulrunner 8.0b2 to see if this would go away but it persists.
Additionally, I have a few versions of firefox installed (up to the most
recent) and none of them exhibit this behavior.  I wonder if there are some
preferences I can set that will make my xul:browser emulate firefox more
closely?

Thanks for any help.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.