Closed Bug 236450 Opened 22 years ago Closed 21 years ago

[FIX] noscript element with display type set is rendered even if javascript is enabled

Categories

(Core :: Layout, defect)

x86
All
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: lasse, Assigned: MatsPalmgren_bugz)

Details

(Keywords: compat, testcase)

Attachments

(2 files, 2 obsolete files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040302 Firefox/0.8 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040302 Firefox/0.8 When a noscript element has a display type set, the content is rendered even if javascript is enabled. Furthermore, markup contained in the noscript element is displayed as plain text. Reproducible: Always Steps to Reproduce: 1. Open testcase 2. See results 3. Turn of javascript in browser 4. Reload page Actual Results: Contents of noscript element is shown when javascript is enabled Expected Results: Noscript content should not be rendered if javascript is enabled. Will upload testcase shortly. This code exposes the problem: <script type="text/javascript"> document.write("<p>Javascript works</p>"); </script> <noscript style="display:block;"> <p>Javascript <strong>does not </strong>work.</p> </noscript> Both Opera 7.x and IE6 hides the noscript content.
Keywords: testcase
OS: Windows 2000 → All
Keywords: compat
Summary: noscript element with display type set is rendered even if javascript is enabled → [FIX] noscript element with display type set is rendered even if javascript is enabled
Attached patch Patch rev. 1 (obsolete) — Splinter Review
Make 'display:none' important for <noscript> when script is enabled.
Assignee: nobody → mats.palmgren
Status: NEW → ASSIGNED
Attachment #143237 - Flags: review?(bzbarsky)
Comment on attachment 143237 [details] [diff] [review] Patch rev. 1 There's no need for the display:inline thing, is there? That's the default value of display, and now that you've removed the ua.css rule there is no need for the display:inline... In other words, just flip the sense of the IsScriptEnabled() check and change the rule to use none!important instead of inline.
Attachment #143237 - Flags: review?(bzbarsky) → review-
Attached patch Patch rev. 2Splinter Review
Yes, that's better. (sorry for the delay in dealing with this)
Attachment #143237 - Attachment is obsolete: true
Attachment #143238 - Attachment is obsolete: true
Attachment #170133 - Flags: superreview?(bzbarsky)
Attachment #170133 - Flags: review?(bzbarsky)
Comment on attachment 170133 [details] [diff] [review] Patch rev. 2 r+sr=bzbarsky
Attachment #170133 - Flags: superreview?(bzbarsky)
Attachment #170133 - Flags: superreview+
Attachment #170133 - Flags: review?(bzbarsky)
Attachment #170133 - Flags: review+
Checked in 2005-01-03 11:37 PDT. -> FIXED
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Verified FIXED using the testcase https://bugzilla.mozilla.org/attachment.cgi?id=142904 on Windows XP, with Seamonkey build 2005-01-17-07.
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: