Closed
Bug 384802
Opened 19 years ago
Closed 19 years ago
javascript disabled but not reported as such in Preferences
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: dumont.v, Unassigned)
Details
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4) Gecko/20061201 Firefox/2.0.0.4 (Ubuntu-feisty)
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4) Gecko/20061201 Firefox/2.0.0.4 (Ubuntu-feisty)
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 either one add-on or Firefox has changed one inner flag which tells Firefox to ignore events and/or Javascript.
The CSS in this case is simply used to position the different elements and decorate them.
Reproducible: Always
Steps to Reproduce:
1. Load the HTML code given above
2.
3.
Actual Results:
The page displays correctly (as I want it !) and the three DIV.scroller appear on screen semi-transluscent, with a background image.
Expected Results:
1. The opacity of DIV.scroller should revert to 1 on mouse over and to the default value on mouse out.
2. Clicking the top DIV.scroller should trigger a call to the function toTop().
3. Mouse down on the two other DIV.scroller should trigger a call to the function scrollIt()
<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>
I deeply apologize for the trouble I caused !
This was not a bug in Firefox but one in the submitted code. The DIV#view was misplaced and intercepted all mouse events that I wanted to use, preventing the expected behaviour from occuring.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•