Closed
Bug 12126
Opened 25 years ago
Closed 25 years ago
Removing "bgcolor" attribute from BODY tag doesn't trigger repaint
Categories
(Core :: Layout, defect, P3)
Core
Layout
Tracking
()
M11
People
(Reporter: kinmoz, Assigned: troy)
References
Details
Attachments
(1 file)
537 bytes,
text/html
|
Details |
nsHTMLEditor::SetBackgroundColor() does not use a transaction to set the bgcolor attribute on the body. It needs to if we want to be able to undo this action. I believe all that needs to be done is to call SetBodyAttribute()?
Updated•25 years ago
|
Assignee: sfraser → cmanske
Comment 1•25 years ago
|
||
charlie implemented this, so I'll let him handle it.
Updated•25 years ago
|
Status: NEW → ASSIGNED
Target Milestone: M10
Charlie, I think what we need to do here is get rid of SetBackgroundColor() from all our interfaces and just have the JavaScript call SetBodyAttribute(). SetBodyAttribute() goes through the transaction system I believe.
Comment 4•25 years ago
|
||
But this method sets (i.e, will set) table backgrounds when that is appropriate. Although I guess the logic to check if you are in a table could also be done in JS. I just need to use nsHTMLEditor::SetAttribute instead.
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment 5•25 years ago
|
||
Checked in 8/25
Whiteboard: waiting for hyatt's XPFE menu fix in order to verify this one
not fixed...both Kin and I saw that undoing a bg change didn't work...
forgot to add that it was the 9/2 build that we noticed it wasn't fixed..
Updated•25 years ago
|
Status: REOPENED → ASSIGNED
Target Milestone: M10 → M11
Updated•25 years ago
|
Resolution: FIXED → ---
Comment 8•25 years ago
|
||
Well I'm using the nsEditor::SetAttribute() method that goes through the transaction system and it worked after I first tested it, but it doesn't seem to undo now. Must be another problem.
Comment 9•25 years ago
|
||
I updated my tree as of 9/2/99 mid afternoon and it works fine. I used File|New from the browser to create a new editor document, typed in it, and tested both File|Close and File|Quit and in both cases it brought up a dialog asking you to save. It also worked from the default editor page, after typing in it.
Comment 10•25 years ago
|
||
Charley, I tried undo'ing after changing the bg color...still not working using 9/17 builds...you wanted me to check this out....
Updated•25 years ago
|
Assignee: cmanske → troy
Status: ASSIGNED → NEW
Component: Editor → Layout
Summary: Make nsHTMLEditor::SetBackgroundColor() an undoable action. → Removing "bgcolor" attribute from BODY tag doesn't trigger repaint
Whiteboard: waiting for hyatt's XPFE menu fix in order to verify this one
Comment 11•25 years ago
|
||
This one has been mysterious! The problem is this: When setting the color, the current value of "bgcolor" is saved, as well as a bool that the attribute is set. This is used to undo the action. The problem is this: When using the Set Background color the first time, then undoing, the undo action correctly removes the "bgcolor" attribute, but the document isn't repainted. You can use the test file to confirm this: 1. Load the test page 2. Click on the "Set Background Red" button JUST ONCE. (you have to resize the windo for the complete background to be repainted - that is a separate bug.) 3. Click on "Remove..." button to remove the bgcolor attribute. Resizing doesn't clear the red background.
Comment 12•25 years ago
|
||
Status: NEW → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Comment 13•25 years ago
|
||
*** This bug has been marked as a duplicate of 1886 ***
Comment 14•25 years ago
|
||
verified in 12/7 build.
Comment hidden (collapsed) |
You need to log in
before you can comment on or make changes to this bug.
Description
•