Last Comment Bug 290026 - Outdent of List does not work properly
: Outdent of List does not work properly
Status: RESOLVED FIXED
New steps to reproduce at comment #7
:
Product: Core
Classification: Components
Component: Editor (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla9
Assigned To: Fabien Cazenave [:kaze]
:
: Makoto Kato [:m_kato]
Mentors:
: 414351 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-04-12 01:40 PDT by malika.jaiswal
Modified: 2011-09-17 16:34 PDT (History)
10 users (show)
iann_bugzilla: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
inserting <div> tag if node for indenting is a list (1.95 KB, patch)
2005-04-13 23:51 PDT, ABHIJEET BHATTACHARYA
no flags Details | Diff | Splinter Review
patch (1.23 KB, patch)
2005-07-25 21:52 PDT, ABHIJEET BHATTACHARYA
no flags Details | Diff | Splinter Review
Unbitrotted patch (1.18 KB, patch)
2011-08-06 07:03 PDT, Ian Neal
no flags Details | Diff | Splinter Review
Test attempt (2.20 KB, patch)
2011-08-06 16:13 PDT, Ian Neal
no flags Details | Diff | Splinter Review
Working test (4.72 KB, patch)
2011-08-07 10:19 PDT, Ian Neal
no flags Details | Diff | Splinter Review
mochitest-plain test for bug 290026 [Checked in: Comment 17] (2.65 KB, patch)
2011-08-08 15:27 PDT, Ian Neal
ehsan: review+
Details | Diff | Splinter Review
patch proposal (2.59 KB, patch)
2011-08-30 09:41 PDT, Fabien Cazenave [:kaze]
ehsan: review+
Details | Diff | Splinter Review

Description malika.jaiswal 2005-04-12 01:40:24 PDT
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.
Comment 1 ABHIJEET BHATTACHARYA 2005-04-12 02:01:59 PDT
confirming the bug on OS/2.
Comment 2 zug_treno 2005-04-12 23:31:20 PDT
This bug is also reproducible with Mozilla 1.8b1 and Mozilla 1.8b2
Gecko/20050410, duplicate of/related to Issue 4 of Bug 209753?
Comment 3 ABHIJEET BHATTACHARYA 2005-04-13 23:51:06 PDT
Created attachment 180678 [details] [diff] [review]
inserting <div> tag if node for indenting is a list

Adding <div> tag to the list node is solving the problem.
Comment 4 ABHIJEET BHATTACHARYA 2005-07-25 21:52:13 PDT
Created attachment 190508 [details] [diff] [review]
patch
Comment 5 Gérard Talbot 2005-10-02 19:14:40 PDT
*** Bug 291780 has been marked as a duplicate of this bug. ***
Comment 6 zug_treno 2005-10-03 05:18:26 PDT
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.
Comment 7 Gérard Talbot 2005-10-05 17:14:39 PDT
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.
Comment 8 Frank Wein [:mcsmurf] 2005-10-31 02:38:42 PST
Comment on attachment 180678 [details] [diff] [review]
inserting <div> tag if node for indenting is a list

cancel review on generic account
Comment 9 Wayne Mery (:wsmwk, NI for questions) 2006-12-22 09:03:21 PST
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.
Comment 10 Ian Neal 2011-08-06 07:03:35 PDT
Created attachment 551254 [details] [diff] [review]
Unbitrotted patch

Unbitrotted version of the patch.
Comment 11 Ian Neal 2011-08-06 16:13:20 PDT
Created attachment 551288 [details] [diff] [review]
Test attempt

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?
Comment 12 Ian Neal 2011-08-07 10:19:52 PDT
Created attachment 551326 [details] [diff] [review]
Working test

Working test to go with patch - it needed an editor element for it to work.
Comment 13 :Ehsan Akhgari 2011-08-08 14:24:51 PDT
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.
Comment 14 :Ehsan Akhgari 2011-08-08 14:25:27 PDT
Comment on attachment 551254 [details] [diff] [review]
Unbitrotted patch

Hmm, this doesn't seem correct at all.  What is the rationale behind this patch?
Comment 15 Ian Neal 2011-08-08 15:27:05 PDT
Created attachment 551591 [details] [diff] [review]
mochitest-plain test for bug 290026 [Checked in: Comment 17]

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.
Comment 16 Ian Neal 2011-08-09 04:19:37 PDT
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.
Comment 17 Ian Neal 2011-08-09 16:19:05 PDT
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".
Comment 18 Fabien Cazenave [:kaze] 2011-08-30 09:41:40 PDT
Created attachment 556883 [details] [diff] [review]
patch proposal

http://tbpl.allizom.org/?tree=Try&usebuildbot=1&rev=7484d04b4934
Comment 19 :Ehsan Akhgari 2011-08-31 15:29:01 PDT
Comment on attachment 556883 [details] [diff] [review]
patch proposal

Can this be landed?
Comment 20 Fabien Cazenave [:kaze] 2011-09-02 07:51:12 PDT
TryServer looks ok:
https://tbpl.mozilla.org/?tree=Try&usebuildbot=1&rev=7484d04b4934
Comment 22 Marco Bonardo [::mak] 2011-09-03 02:57:56 PDT
http://hg.mozilla.org/mozilla-central/rev/cd28b53198ea
Comment 23 Ian Neal 2011-09-17 16:34:41 PDT
*** Bug 414351 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.