Removing "bgcolor" attribute from BODY tag doesn't trigger repaint

VERIFIED DUPLICATE of bug 1886

Status

()

P3
normal
VERIFIED DUPLICATE of bug 1886
19 years ago
19 years ago

People

(Reporter: kinmoz, Assigned: troy)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

19 years ago
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

19 years ago
Assignee: sfraser → cmanske

Comment 1

19 years ago
charlie implemented this, so I'll let him handle it.

Comment 2

19 years ago
*** Bug 11773 has been marked as a duplicate of this bug. ***

Updated

19 years ago
Status: NEW → ASSIGNED
Target Milestone: M10
(Reporter)

Comment 3

19 years ago
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

19 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

19 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED

Comment 5

19 years ago
Checked in 8/25

Updated

19 years ago
Whiteboard: waiting for hyatt's XPFE menu fix in order to verify this one

Updated

19 years ago
Status: RESOLVED → REOPENED

Comment 6

19 years ago
not fixed...both Kin and I saw that undoing a bg change didn't work...

Comment 7

19 years ago
forgot to add that it was the 9/2 build that we noticed it wasn't fixed..

Updated

19 years ago
Status: REOPENED → ASSIGNED
Target Milestone: M10 → M11

Updated

19 years ago
Resolution: FIXED → ---

Comment 8

19 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

19 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

19 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

19 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

19 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

19 years ago
Created attachment 1741 [details]
Test setting and removing the "bgcolor" attribute on BODY tag
(Assignee)

Updated

19 years ago
Status: NEW → RESOLVED
Last Resolved: 19 years ago19 years ago
Resolution: --- → DUPLICATE
(Assignee)

Comment 13

19 years ago
*** This bug has been marked as a duplicate of 1886 ***

Updated

19 years ago
QA Contact: sujay → gerardok

Updated

19 years ago
Status: RESOLVED → VERIFIED
QA Contact: gerardok → sujay

Comment 14

19 years ago
verified in 12/7 build.
You need to log in before you can comment on or make changes to this bug.