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. Advertising

  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. Advertising

  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. 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. Jordan
    Replies:
    1
    Views:
    3,825
    Bruce Barker
    Jun 10, 2005
  2. Tamlyn Rhodes
    Replies:
    3
    Views:
    972
    Andy Dingley
    Feb 26, 2004
  3. Luigi Donatello Asero

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

    Luigi Donatello Asero, May 6, 2006, in forum: HTML
    Replies:
    31
    Views:
    1,195
    Toby Inkster
    May 7, 2006
  4. Marcus
    Replies:
    0
    Views:
    476
    Marcus
    Oct 6, 2008
  5. Eqbal Z
    Replies:
    6
    Views:
    184
    Eqbal Z
    Aug 27, 2003
Loading...

Share This Page