Closed
Bug 131788
Opened 23 years ago
Closed 23 years ago
In the sample codes included the Carga() function works only the first time
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
VERIFIED
WORKSFORME
People
(Reporter: juarez_jc, Assigned: joki)
Details
(Whiteboard: [Note small typo in sample code; explained in Comment #2])
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.9) Gecko/20020311
BuildID:
In the build 2002020406 the code bellow worked fine, as in Netscape 4.X
and Internet Explorer.
--------------- Teste.htm -------------
<html>
<body onclick='Carga();'>
<iframe name='wPgm' frameborder='0' FRAMESPACING='0' NORESIZE='NORESIZE'
SCROLLING='no'
style='position:absolute;top:35px;left:300px;width:300px;height:300px;'
src='azul.htm'></iframe>
</body>
<script>
var Vez = 0;
function Carga()
{
wPgm.document.write("<body>Carregando...</body>");
wPgm.document.close();
if(Vez%2)
wPgm.document.location.href = "azul.htm";
else
wPgm.document.location.href = "vermelho.htm";
Vez++;
}
</script>
</html>
----------------- Azul.htm -----------------
<body bgolor=#0000ff></body>
--------------- Vermelho.htm ---------------
<body bgolor=#ff0000></body>
Reproducible: Always
Steps to Reproduce:
1.Save the 3 codes included.
2.Load the teste.htm
3.Click more than one time in the body
Actual Results: Whem the main body is clicked the wPgm turns to red.
Expected Results: the wPgm iframe should change from blue to red to blue to red
... as the main body is clicked.
Comment 1•23 years ago
|
||
Are there any errors in the JS console?
Comment 2•23 years ago
|
||
Browser, not engine ---> Event Handling. Note the small typo in the above:
----------------- Azul.htm -----------------
<body bgolor=#0000ff></body>
--------------- Vermelho.htm ---------------
<body bgolor=#ff0000></body>
Should be "bgcolor", not "bgolor". Just a typo, that's all -
Assignee: rogerl → joki
Component: JavaScript Engine → Event Handling
QA Contact: pschwartau → madhur
Whiteboard: [Note small typo in sample code; explained in Comment #2]
Comment 3•23 years ago
|
||
Confirming the bug with Mozilla trunk binary 20020311xx on WinNT.
The color changes once only.
However, the sample code WORKSFORME using Mozilla trunk binary
20020317xx on WinNT. When I click several times on the page body,
the <IFRAME> element changes color back and forth the same number
of times. The only difference between Mozilla and IE6 is this:
Mozilla changes color for each single click. So if you double-click,
the color chages twice; e.g. from
blue --> red --> blue.
But in IE6, a quick double-click is treated the same as a single-click,
e.g. from
blue ---> red
Juarez, I see you are using build 20020311. Could you try the
sample with today's build? If the problem has gone away, please
mark this bug "Verified". Otherwise, you can reopen it - thanks.
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → WORKSFORME
Summary: In the sample codes included the Carga() function works only the first time. → In the sample codes included the Carga() function works only the first time
Updated•6 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•