can not use the alignment buttons if text styles (bold, italic, and underline) are set before typing

VERIFIED FIXED in mozilla0.9.9

Status

()

P2
normal
VERIFIED FIXED
17 years ago
17 years ago

People

(Reporter: TucsonTester2, Assigned: mozeditor)

Tracking

Trunk
mozilla0.9.9
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: EDITORBASE+; FIXINHAND; patch in bug 103677)

Attachments

(1 attachment)

(Reporter)

Description

17 years ago
Build: 2001091003

If you add in text styles before you begin typing in composer then click on an
alighnment button the text will not center nor will the html be added, but the
alignment button shows as if the text is aligned differently.

Reproducibility: Every time

Steps to Reproduce:
1. Open composer
2. Click on the Bold button on the toolbar
3. Click on the Center alignment button on the toolbar
4. Type in some text

Actual Resutls:
You will notice that the alignment will show it's centered in the toolbar, but
in the actual page itself it does not show the centered alignment.  If you take
a look at the HTML source you will see that there was no div tag added.  Also
the bold option is removed, I don't know if this is another bug or not but that
also happens.

Expected Results:
I would expect that the alignment and bold options would stick.  And that the
correct alignment would be displayed.

Updated

17 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 1

17 years ago
Confirmed on build 2001091303.

Updated

17 years ago
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla0.9.6

Comment 2

17 years ago
--> jfrancis
Assignee: kin → jfrancis
Status: ASSIGNED → NEW
Priority: P3 → --
Target Milestone: mozilla0.9.6 → ---
(Assignee)

Updated

17 years ago
Status: NEW → ASSIGNED
Whiteboard: EDITORBASE; 1 day
Target Milestone: --- → mozilla0.9.7
(Assignee)

Updated

17 years ago
Target Milestone: mozilla0.9.7 → mozilla0.9.8

Updated

17 years ago
Component: Editor: Composer → Editor: Core

Comment 3

17 years ago
More information on this report. If you click the Alignment button BEFORE
clicking the text style button, it will work properly. If you choose any other
text style before clicking on the Alignment button, it will not work. The tags
are not placed in the html source.

Comment 4

17 years ago
This problem also seems to happen if you start with a different color. It
affects all font stylings and all alignments. I am using build 2001121003 and
win ME. 

Updated

17 years ago
Priority: -- → P1

Updated

17 years ago
Priority: P1 → P2

Comment 5

17 years ago
Joe--is this a bug Daniel could help with?
Daniel--is this still a bug after your landing?
(Assignee)

Comment 6

17 years ago
pushing off 098 to 099
Target Milestone: mozilla0.9.8 → mozilla0.9.9
Created attachment 65980 [details] [diff] [review]
patch v1.0

Joe, Kin, can you review this patch please ?

Comment 8

17 years ago
plussing
Whiteboard: EDITORBASE; 1 day → EDITORBASE+; 1 day

Comment 9

17 years ago
Comment on attachment 65980 [details] [diff] [review]
patch v1.0

Get and r=jfrancis and you got my sr=kin@netscape.com.

  - Initialize divType with it's value when it's declared.

  - I don't think you need to vars tmp and theElement in the while loop.
Attachment #65980 - Flags: superreview+

Comment 10

17 years ago
My last statement above should have said "two vars".

Updated

17 years ago
Keywords: nsbeta1+
(Assignee)

Comment 11

17 years ago
Comment on attachment 65980 [details] [diff] [review]
patch v1.0

I feel bad about vetoing this patch, but i think it's the right thing.	Other
recent bug fixes have gotten things to the point where things are almost
working already.  The only remaining problem in the current tip is that we need
a br node inside this div so that we get a proper caret.  Otherwise this is
already working.

I think the right thing to do here to check at postprocessing time
(AfterEditInner) if we are in an empty block, and if put in a br.  I beleive
the best place to put this code is either in AdjustSelection() or by overriding
CreateBogusNode() in the html rules and adding it there.
Attachment #65980 - Flags: needs-work+
(Assignee)

Comment 12

17 years ago
Hey, I had this code in Adjustselection()  (I had just put it in last week!)  I
reordered some things so that it always happens now, instead of sometimes.  This
fixes this bug and 103677.  
Whiteboard: EDITORBASE+; 1 day → EDITORBASE+; FIXINHAND; patch in bug 103677
(Assignee)

Comment 13

17 years ago
fixed on tip
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED

Comment 14

17 years ago
Verified on Win XP using trunk build 02-20.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.