Closed
Bug 8862
Opened 25 years ago
Closed 25 years ago
listStyleImage not directly updated
Categories
(Core :: DOM: CSS Object Model, defect, P3)
Tracking
()
VERIFIED
FIXED
M12
People
(Reporter: martin.honnen, Assigned: pierre)
Details
(Whiteboard: [TESTCASE])
Attachments
(4 files)
I used a STYLE with a list-style-image which worked. When trying to change that image with elementRef.style.listStyleImage = 'url(someImage.gif)'; the change got only shown after I changed the display property of the containing list element to none and then back to block. Complete example <HTML> <HEAD> <STYLE> #aListItem { list-style-image: url(plus.gif); } </STYLE> <SCRIPT> function changeImage () { var aListItem = document.getElementById('aListItem'); aListItem.style.listStyleImage = aListItem.style.listStyleImage.indexOf('minus.gif') != -1 ? 'url(plus.gif)' : 'url(minus.gif)'; alert(aListItem.style.listStyleImage); } </SCRIPT> </HEAD> <BODY> <UL ID="aUL"> <LI ID="aListItem"> Kibology for all. </LI> </UL> <BUTTON ONCLICK="changeImage ()"> change image </BUTTON> <BUTTON ONCLICK="var aUL = document.getElementById('aUL'); aUL.style.display = 'none'; aUL.style.display = 'block';"> change display of list </BUTTON> </BODY> </HTML>
Reporter | ||
Comment 1•25 years ago
|
||
Reporter | ||
Comment 2•25 years ago
|
||
Reporter | ||
Comment 3•25 years ago
|
||
Comment 4•25 years ago
|
||
Updated•25 years ago
|
Whiteboard: [TESTCASE]
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Works now, with Sept 14 build (Linux). I get: JavaScript Error: uncaught exception: [Exception... "Component does not have requested interface" code: "-2147467262" nsresult: "0x80004002 (NS_NOINTERFACE)" location: "file:///home/shaver/mozilla/tests/8679/8679.html Line: 10"] when I click the "change image" button, but the image changes. Line 10 is: var aListItem = document.getElementById('aListItem'); but that's almost certainly not where the error's occuring, because the style change that follows is executed. If I take out alert(aListItem.style.listStyleImage); I don't get the error, so I think that's the problem. I'm marking this fixed; let's deal with the exception later.
Updated•25 years ago
|
Status: RESOLVED → REOPENED
Comment 6•25 years ago
|
||
It seems to be fixed when using DOM to change the list-style-image property, but when the className property is changed to a another class with a different list-style-image, this bug is creeps up again. See: http://m1.aol.com/supersamat/dom/toc/table-of-contents.htm and for a screenshot'ed explanation if not understood: http://m1.aol.com/supersamat/dom/toc/moz-bug/liststyleimage.html I've only tested on Win32. I did not feel like filing a new bug since this is just a variation of 8862 (this one).
Comment 8•25 years ago
|
||
Assigning to Pierre, the new style system owner. Changing the className should, especially in this case, cause recreation of frames for the element. Pierre, feel free to discuss this with me when you get to it.
Assignee: vidur → pierre
Status: REOPENED → NEW
Assignee | ||
Updated•25 years ago
|
Status: NEW → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 9•25 years ago
|
||
Fixed checked in nsGenericHTMLElement.cpp v1.136 per Vidur's suggestion.
Updated•24 years ago
|
Component: DOM Level 2 → DOM Style
Comment 10•24 years ago
|
||
Taking QA Contact on all open or unverified DOM Style bugs...
QA Contact: vidur → ian
For the record, the fix for this bug was completely incorrect and just blew away everything for class attribute changes instead of using the correct style change mechanisms. The correct fix was made in bug 21225.
You need to log in
before you can comment on or make changes to this bug.
Description
•