FF 3.6 vs IE7 -- clicking on inner DIV causing outer DIV onBlur tofire in FF not in IE

Discussion in 'Javascript' started by Tom Y, Jul 12, 2011.

  1. Tom Y

    Tom Y Guest

    I suspect that the FF behavior is the correct one but the problem is that the IE behavior is actually what works for my purposes.

    Is there something that I can do so that FF will allow the inner DIV to get the onClick without the outer DIV seeing onBlur?

    Thanks.
    Tom Y, Jul 12, 2011
    #1
    1. Advertising

  2. Tom Y

    Elegie Guest

    Re: FF 3.6 vs IE7 -- clicking on inner DIV causing outer DIV onBlurto fire in FF not in IE

    On 12/07/2011 02:52, Tom Y wrote :

    Hi Tom,

    > Is there something that I can do so that FF will allow the inner DIV to get the onClick without the outer DIV seeing onBlur?


    Unfortunately I have Firefox 5 and not 3.6, but cannot reproduce the
    issue in it. Would you mind posting a quick test case demonstrating the
    problem?

    I have tried the following script. When you click on the inner DIV, no
    blur event is dispatched. Do you have one in FF 3.6?

    ---
    <!DOCTYPE html>
    <html>
    <head><title>Test Div ONblur</title>
    <body>
    <div id="outer">Outer Div<div id="inner">Inner Div</div></div>
    <script type="text/javascript">
    var innerDiv = document.getElementById("inner");
    var outerDiv = document.getElementById("outer");
    function showEvent(evt) {alert((evt || window.event).type);}
    innerDiv.onclick = showEvent;
    outerDiv.onblur = showEvent;
    </script>
    </body>
    </html>
    ---

    Regards,
    Elegie.
    Elegie, Jul 12, 2011
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. lonelyplanet999

    Access outer / inner class variables query

    lonelyplanet999, Nov 11, 2003, in forum: Java
    Replies:
    3
    Views:
    5,298
    lonelyplanet999
    Nov 18, 2003
  2. lonelyplanet999
    Replies:
    1
    Views:
    2,211
    VisionSet
    Nov 13, 2003
  3. phl
    Replies:
    1
    Views:
    4,343
    Martin Jay
    Jun 8, 2006
  4. Mc Lauren Series
    Replies:
    3
    Views:
    1,279
    Neredbojias
    Feb 13, 2010
  5. Replies:
    1
    Views:
    305
Loading...

Share This Page