Closed
Bug 14691
Opened 25 years ago
Closed 24 years ago
z-index problems with overflow:scroll [POS]
Categories
(Core :: DOM: CSS Object Model, defect, P3)
Core
DOM: CSS Object Model
Tracking
()
VERIFIED
FIXED
mozilla0.9
People
(Reporter: beard, Assigned: roc)
References
Details
(Keywords: css2, dom2, testcase)
Attachments
(2 files)
Trying to change style properties using
document.getElementById(id).style.setProperty('z-index', 1, '') doesn't work.
Nothing changes. I've also tried by assigning to style.zIndex, and others, such
as backgroundColor, but nothing changes.
Reporter | ||
Comment 1•25 years ago
|
||
Here's a test case that doesn't work for me:
<html>
<head>
<SCRIPT>
function raise(obj)
{
var style = obj.style;
style.setProperty('z-index', 1 + Number(style.zIndex), '');
dump('z-index = ' + style.getPropertyValue('z-index') + '\r');
}
</SCRIPT>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form>
<div id="myDiv1"
onMouseOver="raise(document.getElementById('myDiv1'))"
style="position:absolute;z-index:1;top:10px;left:10px;background-color:gray;
width:100px;height:75px;overflow:scroll">
Hello<BR>Hello<BR>Hello<BR>Hello<BR>Hello<BR>
</div>
<div id="myDiv2"
onMouseOver="raise(document.getElementById('myDiv2'))"
style="position:absolute;z-index:0;top:40px;left:40px;background-color:blue;
width:100px;height:75px;overflow:scroll">
Hello<BR>Hello<BR>Hello<BR>Hello<BR>Hello<BR>
</div>
</form>
</body>
</html>
Updated•25 years ago
|
Summary: Changing style properties? → {css2} Changing style properties?
Comment 2•25 years ago
|
||
In an attempt to get my bug list in order again, marking all the bugs I have
currently as ASSIGNED.
Comment 3•25 years ago
|
||
Migrating from {css2} to css2 keyword. The {css1}, {css2}, {css3} and {css-moz}
radars should now be considered deprecated in favour of keywords.
I am *really* sorry about the spam...
Updated•25 years ago
|
Summary: {css2} Changing style properties? → Changing style properties?
Comment 4•25 years ago
|
||
This is only an issue if the DIV is scrollable. In that case, z-index is
ignored, whether its in the original inline STYLE attribute or set later via the
DOM. I'm attaching two test cases - one which works correctly (had to make some
modifications to the original test) without overflow and the same test with
overflow. Passing along to Eric Vaughn.
Assignee: vidur → evaughan
Status: ASSIGNED → NEW
Comment 5•25 years ago
|
||
Comment 6•25 years ago
|
||
Updated•25 years ago
|
Summary: Changing style properties? → z-index problems with overflow:scroll
Comment 8•25 years ago
|
||
Mass-moving all M16 non-feature bugs to M17, which we still consider to be
part of beta2
Target Milestone: M16 → M17
Comment 9•25 years ago
|
||
nominating for beta2, we're not sure how common this is & would like PDT to
make the call.
Keywords: nsbeta2
Comment 10•24 years ago
|
||
PDT needs info on how common this is to triage for beta2.
Whiteboard: [NEED INFO]
Comment 11•24 years ago
|
||
This is yet another absolute positioning bug with gfxscrollbars. Which I believe
is already [beta2+]. Hopefully they are all the same root problem.
Comment 12•24 years ago
|
||
I don't think this is common within content, so it can be deferred for beta3
from that standpoint. I don't understand what the other gfxscrollbars issues
are or what the relationship to them would be. But those other bugs haven't been
marked as depending on this.
Whiteboard: [NEED INFO]
Comment 16•24 years ago
|
||
As per meeting with ChrisD today, taking QA.
QA Contact: vidur → py8ieh=bugzilla
Assignee | ||
Comment 17•24 years ago
|
||
I have this working now with my overhaul of nsViewManager2.
Comment 18•24 years ago
|
||
Could you take the bug Robert? GaryF is no longer involved in this project.
Assignee: garyf → roc+moz
Comment 19•24 years ago
|
||
Reassigning to Robert, who has a fix pending review in bug 39621.
Assignee | ||
Updated•24 years ago
|
Status: NEW → ASSIGNED
Updated•24 years ago
|
Summary: z-index problems with overflow:scroll → z-index problems with overflow:scroll [POS]
Comment 20•24 years ago
|
||
Rubber stamping [nsbeta3-], since Robert's fix is slated for the next release
do to high risk considerations.
Whiteboard: [nsbeta2-] → [nsbeta2-] [nsbeta3-]
Updated•24 years ago
|
Whiteboard: [nsbeta2-] [nsbeta3-]
Assignee | ||
Updated•24 years ago
|
Target Milestone: M18 → ---
Updated•24 years ago
|
Component: DOM Level 2 → DOM Style
Comment 21•24 years ago
|
||
Taking QA Contact on all open or unverified DOM Style bugs...
Comment 22•24 years ago
|
||
*** Bug 71238 has been marked as a duplicate of this bug. ***
Assignee | ||
Updated•24 years ago
|
Target Milestone: --- → mozilla0.9
Comment 23•24 years ago
|
||
There's something a little bit strange going on here; it would be good to know
if the behaviour is correct.
When you move from the raised square to the unraised one, the unraised one
doesn't raise unless you are _not_ hovering over the text. This is in both
testcases.
Is that right?
Gerv
Assignee | ||
Comment 24•24 years ago
|
||
I think that behaviour is correct. The Javascript tests "if (event.target ==
this)"; when you mouse over the text, event.target will be referring to the text
node, not the DIV node.
This bug is now fixed.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 25•24 years ago
|
||
With 2001040120 on Windows 2000, the scrollbar on the gray div of the test case
with overflow displays two thumbs when I scroll down. (With the Classic skin, at
least. Haven't tried others.)
Assignee | ||
Comment 26•24 years ago
|
||
Hmm ... I found a repainting bug, but it doesn't belong here. I have filed bug
74413 against myself.
Comment 27•23 years ago
|
||
Wow. http://bugzilla.mozilla.org/showattachment.cgi?attach_id=6234 works
perfectly, and can I just say, it's really cool! :-)
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•