Closed Bug 290026 Opened 18 years ago Closed 12 years ago

Outdent of List does not work properly

Categories

(Core :: DOM: Editor, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla9

People

(Reporter: malika.jaiswal, Assigned: kaze)

References

Details

(Whiteboard: New steps to reproduce at comment #7)

Attachments

(4 files, 3 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050319
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050319

Outdent of List in Composer does not work properly.

Reproducible: Always

Steps to Reproduce:
1. Goto Composer, and create a List.
2. Indent the List two or three times.
3. Then try to Outdent it once.

Actual Results:  
The List is lost and the contents move to the initial positions.

Expected Results:  
The List should not be lost and the contents should move to the last outdent.
confirming the bug on OS/2.
This bug is also reproducible with Mozilla 1.8b1 and Mozilla 1.8b2
Gecko/20050410, duplicate of/related to Issue 4 of Bug 209753?
Adding <div> tag to the list node is solving the problem.
Attachment #180678 - Flags: review?(composer)
Attached patch patch (obsolete) — Splinter Review
Attachment #190508 - Flags: review?(daniel)
*** Bug 291780 has been marked as a duplicate of this bug. ***
This bug and bug 291780 are both still reproducible with SeaMonkey 1.0a and
SeaMonkey/20051002/1.1a. 

This bug is reproducible with Mozilla 1.4 but WFM with Mozilla 1.0. Bug 291780
is WFM with Mozilla 1.4 but reproducible with Mozilla 1.0, so it seems that
these bugs are two different problems.
New Steps to Reproduce:
1. Set Edit/Preferences.../Composer/Use CSS styles instead of HTML elements and
attributes checkbox should be checked
2. Create a bulleted (unordered) List (ul)
3. In the HTML Tags edition mode (with all the yellow icons), click on the UL
yellow icon to select it. The whole list gets highlighted, selected; the <UL> in
the status bar gets highlighted.
4. Indent the List (ul) two or three times.
5. Then try to Outdent it once.

I get the actual results with Seamonkey 1.1a rv: 1.9a1 build 2005100505 under XP
Pro SP2 here.

I could not find a duplicate for this

CONFIRMING

Note: I get the expected results with Nvu 1.0 build 20050620.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: clean-report
Summary: Outdent of List in Composer does not work properly. → Outdent of List does not work properly
Whiteboard: New steps to reproduce at comment #7
Comment on attachment 180678 [details] [diff] [review]
inserting <div> tag if node for indenting is a list

cancel review on generic account
Attachment #180678 - Flags: review?(composer)
Daniel, is there a problem with the patch, attachment 190508 [details] [diff] [review], or something else holding up review ?

step 3 of Gérard's comment 7 is key.
Version: unspecified → Trunk
Assignee: composer → nobody
QA Contact: composer
Unbitrotted version of the patch.
Assignee: nobody → iann_bugzilla
Attachment #190508 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #551254 - Flags: review?(ehsan)
Attachment #190508 - Flags: review?(daniel)
Component: Composer → Editor
Product: SeaMonkey → Core
QA Contact: composer → editor
Attached patch Test attempt (obsolete) — Splinter Review
Okay, so I've written a test, it works if I do it from a web page with a button but not via a test. Missing something obvious perhaps?
Attached patch Working test (obsolete) — Splinter Review
Working test to go with patch - it needed an editor element for it to work.
Attachment #551288 - Attachment is obsolete: true
Attachment #551326 - Flags: review?(ehsan)
Comment on attachment 551326 [details] [diff] [review]
Working test

Can you please rewrite this test as a simple mochitest-plain HTML test?  There is nothing about the code involved which would make this bug only happen for <xul:editor>, so I would rather keep the test case generic.
Attachment #551326 - Flags: review?(ehsan)
Comment on attachment 551254 [details] [diff] [review]
Unbitrotted patch

Hmm, this doesn't seem correct at all.  What is the rationale behind this patch?
Attachment #551254 - Flags: review?(ehsan)
This series of tests does the following:
* Creates a bulletted list.
* Indents once and tests it is as expected.
* Indents a second time and tests it is as expected.
* Outdents once and tests it is as expected (should be the same as the output from the first test).

At the moment the first two tests pass and it fails on the third.

Without something other than the bulletted list within the <div>, the <div> gets indented instead - I put in a pair of <p></p> but it could have been any text too.
Attachment #551326 - Attachment is obsolete: true
Attachment #551591 - Flags: review?(ehsan)
Attachment #551591 - Flags: review?(ehsan) → review+
If there are people that know the code, then please take this as it will take some time for me to work my head around it.
Assignee: iann_bugzilla → nobody
Status: ASSIGNED → NEW
Comment on attachment 551591 [details] [diff] [review]
mochitest-plain test for bug 290026 [Checked in: Comment 17]

Checked in with last test changed to "todo_is"

http://hg.mozilla.org/mozilla-central/rev/9c90e16fd6ad

Once this bug is fixed that test should be changed to "is".
Attachment #551591 - Attachment description: mochitest-plain test for bug 290026 → mochitest-plain test for bug 290026 [Checked in: Comment 17]
Flags: in-testsuite+
Assignee: nobody → kaze
Attachment #556883 - Flags: review?(ehsan)
Comment on attachment 556883 [details] [diff] [review]
patch proposal

Can this be landed?
Attachment #556883 - Flags: review?(ehsan) → review+
http://hg.mozilla.org/mozilla-central/rev/cd28b53198ea
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.