Closed
Bug 16887
Opened 25 years ago
Closed 25 years ago
View not hidden on style.visibility = "hidden" change
Categories
(Core :: Layout, defect, P3)
Tracking
()
People
(Reporter: jrohlf, Assigned: troy)
Details
On M10 viewer:
The following test case has an anchor underneath a div tag. The
anchor is not accessible when the div is hidden with the toggle button.
Debugging a bit suggests that the view associated with the AreaFrame
is not hidden as a result of the reflow triggered by the style change.
<html>
<head>
<script>
var div0;
function init()
{
div0 = document.getElementById("div0");
}
</script>
</head>
<body onLoad="init()">
<div id="div0" style="position:absolute; z-index: 2; width:200px; height:200px;
background-color: red; visibility: visible">
</div>
<div style="position:absolute; z-index: 1; top:100">
<a href="http://www.mozilla.org">a link</a>
</div>
<div style="position:absolute; left:250">
<form>
<input type=button value=toggle onclick="if (div0.style.visibility == 'visible')
div0.style.visibility = 'hidden'; else div0.style.visibility = 'visible';">
</form>
</div>
</body>
</html>
The reason we don't hide the view is that CSS2 allows child elements to override
their parent's 'hidden' 'visibility'. It's a little known part of the spec, but
that's the case
What we do is mark the view as having transparent content. The problem is that
the hit testing code isn't taking into account that the frame is hidden and so
the event handling is wrong
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
Yes, you're right. Thanks
*** This bug has been marked as a duplicate of 12232 ***
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Comment 4•25 years ago
|
||
Marking as verified duplicate of 12232.
You need to log in
before you can comment on or make changes to this bug.
Description
•