Closed
Bug 312035
Opened 20 years ago
Closed 19 years ago
:target does not fall back to display: none when another target is targeted
Categories
(Core :: Layout, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: icaaq, Unassigned)
References
()
Details
(Keywords: testcase)
Attachments
(1 file)
|
1.16 KB,
text/html
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b5) Gecko/20051006 Firefox/1.4.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b5) Gecko/20051006 Firefox/1.4.1
In the page http://member.webforum.nu/1029/target.htm , the content area should
hide it self when another target is targeted.
Reproducible: Always
Steps to Reproduce:
1. Click on headlineLink1.
2. Click on headlineLink2.
3. Refresh the page and se what it should look like.
Actual Results:
The display:none rule never take place after leaving the :target
Expected Results:
The display:none rule should take place after leaving the :target
Comment 1•20 years ago
|
||
WFM Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a1)
Gecko/20051010 Firefox/1.6a1
Comment 2•20 years ago
|
||
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b5) Gecko/20051006
Firefox/1.4.1
The text disappears, but the empty space remains instead of collapsing. If I
alternate between clicking the first link and clicking the second link, the gaps
keep growing.
Updated•20 years ago
|
Summary: :target doesn´t fall back to it´s display: none when another target is targeted → :target does not fall back to display: none when another target is targeted
Comment 3•20 years ago
|
||
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20051011
Firefox/1.6a1 ID:2005101104
This works exactly as expected for me, if I'm understanding it right. I don't
even see the growing space issue.
| Reporter | ||
Comment 4•20 years ago
|
||
If i use the correct display type: table-row the problem is no longer a problem....
I am duplicating this behavior, my situation is this:
<tr id="priorAddressSection" style="display:none">
etc.
This js works fine in IE, and toggles the <tr> to show or not, but the empty space grows:
function togglePriorAddress(displayPriorAddressSection)
{
var element = document.getElementById("priorAddressSection");
if (element != null)
{
if (displayPriorAddressSection == "yes")
{
element.style.display = "table-row";
}
else if (displayPriorAddressSection == "no")
{
element.style.display = "none";
}
}
}
Comment 7•19 years ago
|
||
Can you reproduce the problem in Gran Paradiso alpha 5? http://www.mozilla.org/projects/firefox/3.0a5/releasenotes/
Component: General → Layout
Keywords: testcase
Product: Firefox → Core
QA Contact: general → layout
Version: unspecified → 1.8 Branch
No. It appears to be fixed in Gran Paradiso alpha 5. Thanks!
Just fyi, for anyone else needing a work-around in current/earlier production versions, the "table-row" display style works fine in 2.0.0.4, but not IE, so the following works for me across those 2 browsers:
try {
element.style.display = "table-row";
}
catch (ignore) {
element.style.display = "inline";
}
Comment 9•19 years ago
|
||
Cool. I'm going to resolve as WORKSFORME, then, since we're not sure what fixed this and it's unlikely to get backported to 2.0.0.x. Thanks for the workaround.
->WORKSFORME
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•