• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item6041: TinyMCE bug with Firefox 3 and bulleted lists

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Extension TinyMCEPlugin Urgent Closed   patch 4.3.0, 5.0.0

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

When used with Firefox 3.0.3 the TinyNCE plugin does not work well with bulleted/numbered lists and indent/dedent.

Also when go to save if a bulleted item is added and no text is typed after it before the save button is pressed get the following error:

TWiki detected an internal error - please check your TWiki logs and webserver logs for more information.

Can't call method "generate" on unblessed reference
 

Also if I create a bulleted list item with text. Add a second bulleted item and indent it to the second level and add text.

Go to a third bulleted list item and then try to dedent it back to the first level, I can do that using the dedent button. If I press enter 3 times

I end up getting a level 1 bulleted item, but it doesn't allways work well.

Also some times after a bulleted list, when I hit enter to add a new line, after the list has been ended, A copy of the page will be inserted under the new line. The copy of the page will be from the top of the page to the top of the list I was working on.

I don't have these issues with IE 7. Probably related to the version of TinyMCE.

-- TWiki:Main/MatthewJackson - 02 Oct 2008

I ran into this problem only 2 days ago. I can confirm it. And if you try to go back and pickaxe you loose all you typed and cannot come back.

I was going to reports once I had a clear reproduction method and I had not noticed that the problem was related to Firefox 3.

I would like to elevate this one to urgent because of the Can't call method "generate" on unblessed reference part of this bug report because it causes loss of data.

-- TWiki:Main.KennethLavrsen - 02 Oct 2008

This caught me recently. I backported a foswiki patch for this to TWiki 4.2.3.

See http://foswiki.org/Tasks/Item584, It's a 2-line fix (with massive re-indentation.)

Note that it's not just firefox - it bit me with IE7.

--- lib/TWiki/Plugins/WysiwygPlugin/HTML2TML/Node.pm~   2008-09-11 23:41:58.000000000 -0400
+++ lib/TWiki/Plugins/WysiwygPlugin/HTML2TML/Node.pm    2008-12-28 15:38:04.000000000 -0500
@@ -615,32 +615,34 @@
         my $spawn = '';
         my $t;
         my $grandkid = $kid->{head};
-        # IE generates spurious empty divs inside LIs. Detect and skip
-        # them.
-        if( $grandkid->{tag} =~ /^div$/i
-              && $grandkid == $kid->{tail}
+       if( $grandkid) {
+           # IE generates spurious empty divs inside LIs. Detect and skip
+           # them.
+           if( $grandkid->{tag} =~ /^div$/i
+               && $grandkid == $kid->{tail}
                 && scalar(keys %{$this->{attrs}}) == 0 ) {
-            $grandkid = $grandkid->{head};
-        }
-        while ($grandkid) {
-            if( $grandkid->{tag} =~ /^[dou]l$/i ) {
-                #$spawn = _trim( $spawn );
-                $t = $grandkid->_convertList( $indent.$WC::TAB );
-            } else {
-                ( $f, $t ) = $grandkid->generate( $WC::NO_BLOCK_TML );
-                $t =~ s/$WC::CHECKn/ /g;
-                # Item5257: If this is the last child of the LI, trim
-                # trailing spaces. Otherwise spaces generated by the
-                # editor before the </li> will be appended to the line.
-                # It is safe to remove them, as TML never depends on
-                # these spaces. If there are any intentional spaces at
-                # the end of protected content, these will have been
-                # converted to &nbsp; and protected that way.
-                $t =~ s/\s+$// unless $grandkid->{next};
-            }
-            $spawn .= $t;
-            $grandkid = $grandkid->{next};
-        }
+               $grandkid = $grandkid->{head};
+           }
+           while ($grandkid) {
+               if( $grandkid->{tag} =~ /^[dou]l$/i ) {
+                   #$spawn = _trim( $spawn );
+                   $t = $grandkid->_convertList( $indent.$WC::TAB );
+               } else {
+                   ( $f, $t ) = $grandkid->generate( $WC::NO_BLOCK_TML );
+                   $t =~ s/$WC::CHECKn/ /g;
+                   # Item5257: If this is the last child of the LI, trim
+                   # trailing spaces. Otherwise spaces generated by the
+                   # editor before the </li> will be appended to the line.
+                   # It is safe to remove them, as TML never depends on
+                   # these spaces. If there are any intentional spaces at
+                   # the end of protected content, these will have been
+                   # converted to &nbsp; and protected that way.
+                   $t =~ s/\s+$// unless $grandkid->{next};
+               }
+               $spawn .= $t;
+               $grandkid = $grandkid->{next};
+           }
+       }
         #$spawn = _trim($spawn);
         $text .= $WC::CHECKn.$indent.$bullet.$WC::CHECKs.$spawn.$WC::CHECKn;
         $pendingDT = 0;

-- TWiki:Main.TimotheLitt - 05 Jan 2009

Added this code into trunk and release branch after testing - reproducing was not easy frown

-- TWiki:Main.SopanShewale - 20 Feb 2009

ItemTemplate
Summary TinyMCE bug with Firefox 3 and bulleted lists
ReportedBy TWiki:Main.MatthewJackson
Codebase 4.2.3
SVN Range TWiki-5.0.0, Tue, 23 Sep 2008, build 17539
AppliesTo Extension
Component TinyMCEPlugin
Priority Urgent
CurrentState Closed
WaitingFor

Checkins TWikirev:17829 TWikirev:17830
TargetRelease patch
ReleasedIn 4.3.0, 5.0.0
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2009-04-08 - PeterThoeny
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback