Closed
Bug 197103
Opened 23 years ago
Closed 21 years ago
hiding+showing DIV causes extra line to be insterted after div
Categories
(Core :: Layout: Block and Inline, defect)
Core
Layout: Block and Inline
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: oskar, Unassigned)
Details
(Keywords: testcase)
Attachments
(1 file)
|
589 bytes,
text/html
|
Details |
User-Agent: Mozilla/5.0 Galeon/1.2.7 (X11; Linux i686; U;) Gecko/20021226 Debian/1.2.7-6
Build Identifier: Mozilla/5.0 Galeon/1.2.7 (X11; Linux i686; U;) Gecko/20021226 Debian/1.2.7-6
A DIV block element is initially visible. When you hide it (by setting style)
and then show it, an empty line is inserted after the DIV element before any
other element. I don't know if this is because the next element is DIV or not.
Reproducible: Always
Steps to Reproduce:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Bug Demo</title>
<script type="text/javascript"><!--
function toggle(es, eh) {
document.getElementById(es).style.display = "";
document.getElementById(eh).style.display = "none";
}
--></script>
</head>
<body>
<div id=fs style="display: none">
<a href="#" onclick="toggle('fh','fs'); return false;">Show</a>
</div>
<div class=d id=fh>
<a href="#" onclick="toggle('fs','fh'); return false;">Hide</a><br>
</div>
<div>After</div>
</body>
</html>
1. Click Hide
2. Click Show
Actual Results:
There is an empty line (line of text) between "Hide" and "After".
Expected Results:
As seen when first loading the page, there should not be an empty line between
"Hide" and "After".
Comment 2•23 years ago
|
||
Comment 4•23 years ago
|
||
Confirming. Even when I strip the <br> out of the testcase, I still see this
happen. The border of neither <div> encompasses the inserted line. Furthermore,
if <body> is given a border, the phenomenon goes away.
Comment 5•21 years ago
|
||
WFM (Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a6) Gecko/20041202 Firefox/1.0+)
Can probably be closed as WFM aswell.
Comment 6•21 years ago
|
||
Also wfm on XP, resolving
Please reopen if you can reproduce with a nightly build.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•