[Bug 120868] Firefox ignores Javascript code

Kelumden dumont.v at skynet.be
Sun Jun 17 18:13:26 UTC 2007


Public bug reported:

Binary package hint: firefox

Version: Firefox 2.0.0.4 on Ubuntu 7.04

No warning is issued.

The  code below worked then ceased to work without warning. When the
cursor moves over the DIV.scroller, the opacity must be set back to 1
(fully opaque) and a click on the revealed area should execute the
associated function (which move DIV#area aroud).

Toggling the switch for Javascript in Preferences did solve twice the
problem then it reappeared. Closing Firefox and restarting it does not
cure the problem !

I also tried the same code with the Javascript stored in an external
file, but again, no difference.

I had various add-ons installed (Firebug 1.05, Web Developer 1.1.4 along
with EasyGesture and FireColor). To find out why, I completely
uninstalled those add-ons without result.

Even if it looks stupid to say (every user says so), I didn't change
Preferences prior to the problem, I just installed the above add-ons !
The reason I submit here is because the code worked sometimes then
abruptly ceased to work.

If I dare to guess, I would say aither one add-on or Firefox has changed
one inner flag which tells Firefox to ignore events and/or Javascript.

If the trouble is due to a fault I made in the code, I deeply apologize
for taking your time !

Page: each DIV is positioned on the page

<html>

  <head>

    <link rel='stylesheet' href='layout.css' type='text/css' />

    <title>Test Lay-out (2)</title>
    <script type="text/javascript" language="javascript" >
      function toTop(e)
        {
          var tref = document.getElementById("area") ;
              tref.style.top = 125 ;
        }
      function moveView(e,dir)
        {
          var tref = document.getElementById("area") ;
              var abtm = tref.style.top + tref.style.height ;
          var trf2 = document.getElementById("view") ;
              var vbtm = trf2.style.top + trf2.style.height ;

          if( dir < 0 && abtm < vbtm )
            tref.style.top -= 1 ;
          if( dir > 0 && tref.style.top < 125 )
            tref.style.top += 1 ;
        }
    </script>
  </head>

  <body>
    <div class="mask upper"> </div>

    <div class="mask lower"> </div>


    <div class="hdr back"> </div>

    <div class="hdr band"> </div>

    <div class="hdr label"> </div>

    <div class="logo"><img src="station.png" height=130></div>


    <div class="menu mnback"> </div>

    <div class="mnbar mb1"> </div>

    <div class="mnbar mb2"> </div>

    <div class="mnbar mb3"> </div>

    <div class="mnloc">Home</div>


    <div id="gotop"  class="scroller"  
                     onmouseover="this.style.opacity=1;" 
                     onmouseout="this.style.opacity=0.5;"
                     onclick="javascript:toTop();" >
      <img src="top.png" width=24></div> 

    <div id="goup"   class="scroller" 
                     onmouseover="this.style.opacity=1;"
                     onmouseout="this.style.opacity=0.5;"
                     onmousedown="javascript:moveView(-1);" >
      <img src="upward.png" width=24></div> 

    <div id="godown" class="scroller" 
                     onmouseover="this.style.opacity=1;"
                     onmouseout="this.style.opacity=0.5;"
                     onmousedown="javascript:moveView(1);" >
      <img src="downward.png" width=24></div> 


    <div id="view"></div>

    <div id="area"> </div>
  </body>

</html>

ProblemType: Bug
Architecture: i386
Date: Sun Jun 17 19:53:19 2007
DistroRelease: Ubuntu 7.04
Package: firefox 2.0.0.4+1-0ubuntu1
PackageArchitecture: i386
SourcePackage: firefox
Uname: Linux tsikinga 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC 2007 i686 GNU/Linux

** Affects: firefox (Ubuntu)
     Importance: Undecided
         Status: Unconfirmed

-- 
Firefox ignores Javascript code
https://bugs.launchpad.net/bugs/120868
You received this bug notification because you are a member of Mozilla
Bugs, which is a bug contact for firefox in ubuntu.




More information about the Ubuntu-mozillateam-bugs mailing list