Closed Bug 191127 Opened 22 years ago Closed 22 years ago

Applying Content Alignment: Vertical to multiple cells produces broken HTML

Categories

(SeaMonkey :: Composer, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.3final

People

(Reporter: jpatokal, Assigned: neil)

Details

(Keywords: helpwanted, Whiteboard: [adt2])

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130 In Table Cell Properties, if Content Alignment: Vertical is adjusted while multiple cells are selected, nothing seems to happen when OK/Apply is selected, and the resulting HTML is broken. Adjustments to Content Alignment: Horizontal work as they should, and so does changing a single cell's vertical alignment. Reproducible: Always Steps to Reproduce: 1. Create a table of at least two cells. 2. Enter content of unbalanced height, like this: +-----+-----+ | Foo | Bar | | | Baz | | | Bat | +-----+-----+ 3. Select both cells with click-drag (or method of choice). 4. Attempt to alter Content Alignment: Vertical from default Top to Middle. Actual Results: +-----+-----+ | Foo | Bar | | | Baz | | | Bat | +-----+-----+ <td style="vertical-align: top;" valign="middle">Foo<br></td> ...which obviously makes no sense. Mozilla goes with the first parameter and valigns top, other browsers may do something different. Expected Results: +-----+-----+ | | Bar | | Foo | Baz | | | Bat | +-----+-----+ <td style="vertical-align: middle;">Foo<br></td> ...as correctly produced when selecting and modifying a single cell! Similar breakage occurs when attempting to modify the vertical alignment of cells that are already set to something other than "top".
I'd guess if css editing is disabled that the valign attribute is less confused I'd guess that if this is broken that it is specific to Composer's JS in that dialog (but that's just my guess).
Keywords: helpwanted, nsbeta1
Attached patch Proposed patch (obsolete) — Splinter Review
Attachment #113728 - Flags: review?(glazman)
The problem was that all multiple changes use attributes, instead of respecting the use CSS style preference.
Assignee: composer → neil
Status: UNCONFIRMED → NEW
Ever confirmed: true
Target Milestone: --- → mozilla1.3final
Comment on attachment 113728 [details] [diff] [review] Proposed patch Are there other places where we are calling set/remove Attribute when we should be calling the "OrEquivalent" versions?
Just a layman's comment, but bugs <A href="http://bugzilla.mozilla.org/show_bug.cgi?id=192217">192217</A> and <A href="http://bugzilla.mozilla.org/show_bug.cgi?id=128339">128339</A> seem related.
Jani, typing "bug 192217" and "bug 128339" is better because bugzilla automagically linkifies them with titles.
Comment on attachment 113728 [details] [diff] [review] Proposed patch The last parameter or the two *OrEquivalent() calls should be false, meaning you WANT a transaction for undo/redo. See definition in http://lxr.mozilla.org/seamonkey/source/editor/libeditor/html/nsHTMLEditor.h#40 6
Attachment #113728 - Flags: review?(glazman) → review-
Attached patch Fixed patchSplinter Review
I didn't have any docs at the time I wrote the previous patch :-/
Attachment #113728 - Attachment is obsolete: true
Attachment #113792 - Flags: superreview+
Attachment #113792 - Flags: approval1.3?
Comment on attachment 113792 [details] [diff] [review] Fixed patch a=asa (on behalf of drivers) for checkin to 1.3 final.
Attachment #113792 - Flags: approval1.3? → approval1.3+
Composer triage team: nsbeta1+/adt2
Keywords: nsbeta1nsbeta1+
Whiteboard: [adt2]
Fix checked in.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
vrfy'd fixed on linux rh8.0 with 2003.02.19.
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: