Text alignment feedback is incorrect inside other styles (in CSS mode)

RESOLVED FIXED

Status

SeaMonkey
Composer
RESOLVED FIXED
15 years ago
13 years ago

People

(Reporter: James Turner, Assigned: glazou)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: EDITORBASE)

Attachments

(1 attachment)

(Reporter)

Description

15 years ago
Create a paragraph of text with a non-default (left) alignment, and apply some
style (bold, italic, color, size, whatever) to some subset of the text. When the
cursor is inside this text, the UI feedback for the text-alignment (the button
in the toolbar) is incorrect (it revert back to the default value of left).

This problem is 'deep' in that the value coming out of the command object is
wrong: I know this becuase we have our own UI for the editor in our editing
application, with copies of pokeMultiStyleUI (or whatever it's called), and the
'state' values that get sent to the JS code are definitely wrong. So as a wild
guess, nsAlignCommand is computing the worng value.

I'll attach a test case in a second.
(Assignee)

Comment 1

15 years ago
glargl ! confirming. taking. plussing (this happens in CSS mode).
Status: NEW → ASSIGNED
Keywords: nsbeta1
Whiteboard: EDITORBASE
(Assignee)

Comment 2

15 years ago
Created attachment 108485 [details] [diff] [review]
patch take #1

This should go in 1.3a.
(Assignee)

Comment 3

15 years ago
Comment on attachment 108485 [details] [diff] [review]
patch take #1

Joe, can you r= please ?
Peter, can you sr= please ?

Thanks.
Attachment #108485 - Flags: superreview?(peterv)
Attachment #108485 - Flags: review?(jfrancis)
(Reporter)

Comment 4

15 years ago
Just to confirm, applying this patch (to our 1.2 branch, but it applied cleanly)
fixes this problem for us. Many thanks Daniel! Oh, and the patch looks fine to
me too, if you'll consider that 1/2 of a review :-)
Comment on attachment 108485 [details] [diff] [review]
patch take #1

>+  if (!blockParent) return NS_ERROR_FAILURE;

This return should be on its own line. Apparently it's the style in these files
so I won't let this block my sr but that style should be changed some day.
Attachment #108485 - Flags: superreview?(peterv) → superreview+

Updated

15 years ago
Attachment #108485 - Flags: review?(jfrancis) → review+
(Assignee)

Comment 6

15 years ago
checked in trunk
Status: ASSIGNED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.