Netscape 7 + div + position:fixed + onmouseover : bug ?

Discussion in 'Javascript' started by Patrice, Oct 5, 2003.

  1. Patrice

    Patrice Guest

    There seems to be a bug with the events mouseOut and mouseOver of divs
    when their position is fixed : when you enter the div with the mouse,
    three events are fired in this order : over, out, over.

    It works as expected with IE6.

    Is this a known problem ?
    Is there any workaround ?

    Patrice

    --- Sample code to try -----------------------------------------
    <html>
    <head>

    <script language=javascript>

    var T = "";

    function pOver (e)
    {
    T +=" over";
    window.status=T;
    }

    function pOut (e)
    {
    T +=" out";
    window.status=T;
    }

    </script>
    </head>

    <body>

    <div Style="border:solid 1px #000000; position: fixed; left: 50px;
    top: 100px; width: 100px; height: 100px;"
    onMouseOver="pOver (event);"
    onMouseOut="pOut(event);">fixed
    </div>

    <div Style="border:solid 1px #000000; position: absolute; left: 200px;
    top: 100px; width: 100px; height: 100px;"
    onMouseOver="pOver (event);"
    onMouseOut="pOut(event);">absolute
    </div>

    </body>
    </html>
    --------------------------------------------
     
    Patrice, Oct 5, 2003
    #1
    1. Advertisements

  2. Patrice

    Csaba2000 Guest

    I haven't checked this myself, but have you checked that
    the target of all three events is the same div?
    I think that may have been an issue for me when I was
    fiddling with mouseOver and Out a while back.

    Csaba
     
    Csaba2000, Oct 6, 2003
    #2
    1. Advertisements

  3. Patrice

    Patrice Guest

    The three events (over, out and over) are fired to same div as can be
    checked with event.target.

    I cannot find a reason for it to work correctly when position is
    absolute and not when position is fixed.

    Patrice
     
    Patrice, Oct 6, 2003
    #3
    1. Advertisements

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. Tamlyn Rhodes
    Replies:
    3
    Views:
    1,282
    Andy Dingley
    Feb 26, 2004
  2. Luigi Donatello Asero

    <div class="position"> and <div class" section">

    Luigi Donatello Asero, May 6, 2006, in forum: HTML
    Replies:
    31
    Views:
    1,588
    Toby Inkster
    May 7, 2006
  3. Luigi Donatello Asero

    Re: <div class="position"> and <div class" section">

    Luigi Donatello Asero, May 6, 2006, in forum: HTML
    Replies:
    1
    Views:
    533
    Luigi Donatello Asero
    May 6, 2006
  4. Tarscher

    div in div position

    Tarscher, Aug 6, 2007, in forum: HTML
    Replies:
    8
    Views:
    684
    Jonathan N. Little
    Aug 9, 2007
  5. Marcus
    Replies:
    0
    Views:
    660
    Marcus
    Oct 6, 2008
  6. claudia
    Replies:
    2
    Views:
    2,475
    claudia
    Feb 28, 2010
  7. Eqbal Z
    Replies:
    6
    Views:
    428
    Eqbal Z
    Aug 27, 2003
  8. H.Steel
    Replies:
    1
    Views:
    139
    GArlington
    Mar 14, 2008
Loading...