Closed Bug 52998 Opened 24 years ago Closed 24 years ago

menu in webpage does not work

Categories

(Core :: DOM: Core & HTML, defect, P2)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: frb, Assigned: jst)

References

()

Details

(Whiteboard: [rtm++][HAVE FIX]sr=vidur, r=pollmann)

Attachments

(3 files)

ON this page, there is a menu on the right column, second row
Choosing "Make your own in the US' causes the following to be output to the
terminal from which mozilla was run:
JavaScript error:
 line 0: lnav is not a function

Reproducability: always
Instructions: see above

The menu works in Netscape Communicator 4.75
reproducible in a build from Friday night (Sept 15).
Status: UNCONFIRMED → NEW
Ever confirmed: true
Browser issue, not engine. Will attach two reduced HTML testcases,
one that reproduces the bug, and one where everything works fine.
The difference between the two is a single line in the HTML.

In the HTML that is buggy:  <input type=submit name="lnav"      value=go>
In the HTML that works:     <input type=submit name="lnavXXXXX" value=go>
Changing OS to "All", since the bug is the same on WinNT as on Linux. Using:

               Mozilla nightly 2000091505 on WinNT
               Mozilla nightly 2000091506 on Linux


Steps to reproduce: load an attachment, and change the item in the drop-down 
box. In the "bad" attachment, nothing will happen, and you will get this error 
in the debug console: 


JavaScript error: 
    line 0: object is not a function


In the good attachment, you will get no error, and a new Web page is loaded. 


The key is the JavaScript function lnav() in the HTML. It is being invoked
on the OnChange event of the <SELECT> element (the drop-down box.) It is also 
referred to by the <INPUT> element referred to above having the name "lnav".


NOTE: the <INPUT> element is contained within <NOSCRIPT> tags.

NOTE: both NN4.7 and IE 4.7 have no problem with either attachment above.
      They both work fine.


Sending to DOM Level 0 for further triage - 
                    
Assignee: rogerl → jst
Component: Javascript Engine → DOM Level 0
OS: Linux → All
QA Contact: pschwartau → desale
Having data inside noscript elements interfere with scripts could potentially
break even well designed pages out there, fixing this is easy and low risk,
gimme a + and I'll whip up a patch.
Status: NEW → ASSIGNED
Keywords: correctness, rtm
Priority: P3 → P2
Hardware: PC → All
Target Milestone: --- → M19
*** Bug 54735 has been marked as a duplicate of this bug. ***
Marking [rtm+ need info].  This can potentially affect existing sites that
duplicate names of elements inside noscript content.  This is a backwards
compatibility issue.
Keywords: 4xp
Whiteboard: [rtm+ need info]
Changed summary to be more specific and accurate (that it is a menu on a
webpage, NOT a XPFE menu that isn't displaying).
Summary: menu does not work → menu in webpage does not work
*** Bug 54888 has been marked as a duplicate of this bug. ***
Attached patch Proposed fixSplinter Review
Whiteboard: [rtm+ need info] → [rtm+ need info][HAVE FIX]
sr=vidur. This is the safest short-term fix, but the mechanism by which we deal
with <noscript> elements (and others of its ilk) should be changed post N6 RTM.
We're finding that these tags are being used as IFDEFs and that's not how our
current design thinks of them. Specifically, we try to build well-formed
subtrees of NOSCRIPT content and that won't produce compatible results with 4.x.
r=pollmann  This fix has the lowest impact that will still fix the problem in
the test case and others like it.  As Vidur mentions, we should re-examine our
handling of content inside <noXXX> tags post-RTM, but this fix is safe and
reasonable for RTM.
Thanks for the reviews!
Whiteboard: [rtm+ need info][HAVE FIX] → [rtm+][HAVE FIX]sr=vidur, r=pollmann
marking rtm++
Whiteboard: [rtm+][HAVE FIX]sr=vidur, r=pollmann → [rtm++][HAVE FIX]sr=vidur, r=pollmann
Fix checked into both netscape6 branch and trunk.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Re-opening this bug. I tested it with 2000-10-16-09 with Win-95 as well as 
Linux. I used Phil's testcases as well as URL mentioned above. For Phil's 
testcase I get error "line 0: Object is not a function".

Johnney I compared the fix you proposed [attachment] and the fix you checked in 
[I saw at bonsai.mozilla.org] and they differ. So may be that is causing 
problem.

Here is difference. I'm attaching only the smallest parts of code which differ.

YOUR PROPOSED FIX:
rv = MakeContentObject(aNodeType, nodeInfo, aForm, aWebShell,
-                           aResult, &content);
+                           aResult, &content, PRBool(mInsideNoXXXTag));

So here you proposed to delete line "aResult, &content);" and to add line 
"aResult, &content, PRBool(mInsideNoXXXTag));" 

But it is different that the actual code you checked in. CVS LOG shows 
following.

YOUR CHECKED IN CODE:
rv = MakeContentObject(aNodeType, nodeInfo, aForm, aWebShell,               
                       aResult, &content, !!mInsideNoXXXTag);

So here you added line "aResult, &content, !!mInsideNoXXXTag);".

New added line [aResult, &content, !!mInsideNoXXXTag);] is totally different 
than proposed line [aResult, &content, PRBool(mInsideNoXXXTag));]. I don't see 
PRBool function used at all. I'm gussing this is the problem.

But somehow this thing is not working.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Oh, I see the last change I made before attaching the patch didn't make it into
the patch. However, PRBool(mInsideNoXXXTag) is equal to !!InsideNoXXXTag in this
case so that's not it. I have no idea what caused this to regress tho.

This testcase works on the trunk today and harishd's uber noscript fix (bug
56501) will also fixes this regression so I think we don't need to do anything
here. Harishd's fix will be in todays branch builds so I'll test with that and
mark fixed again unless this still happens in todays branch builds...
Status: REOPENED → ASSIGNED
Well, it works fine in todays branch and trunk build, so I'm marking FIXED again...
Status: ASSIGNED → RESOLVED
Closed: 24 years ago24 years ago
Resolution: --- → FIXED
Yeah, it is working fine with 2000-10-18-10. Marking it verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: