Opened 9 years ago

Closed 9 years ago

#1061 closed Bug (fixed)

Backspace and delete does not work under Firefox

Reported by: martinkou Owned by: martinkou
Priority: Normal Milestone: FCKeditor 2.5 Beta
Component: General Version: SVN (FCKeditor) - Retired
Keywords: Confirmed Firefox Cc:

Description

This bug is reproducible under both 2.4.3 and the SVN version, though with different procedures. They both seem to be related to the bogus <br> tags added by Mozilla Midas and by us.

Reproduction procedure on 2.4.3:

  1. Go to sample01.html, delete everything.
  2. Press Enter twice.
  3. Press Backspace twice.
  4. Press the up arrow, now the caret hangs above the document.
  5. Press the "Insert Special Character" button, and insert a "TM" character.
  6. Try to delete the "TM" character by backspace or delete.
  7. The "TM" character cannot be deleted, even select + delete does not work.

For the SVN version, I don't have a reliable way of reproducing it, but it seems to occur more often in the SVN version. The following is a more reliable method that I can get the bug to occur after a few trials:

  1. Clear the editor document, and insert a "TM" character with the "Insert Special Character" dialog.
  2. Press backspace to delete it. If you are lucky it wouldn't work.
  3. What if it worked? Undo with Ctrl-Z, and the game begins...
  4. Try any method to move the caret around the "TM" character, End, Home, Left, Up, Down, Right, etc. Open a new line or two below it and delete them. Just mess with the caret, and then try to delete the "TM" character.
  5. After a few trials, you find the "TM" character have gained immortality... if you don't switch to Source mode or refresh the page, that is.

Change History (4)

comment:1 Changed 9 years ago by martinkou

  • Owner set to martinkou
  • Status changed from new to assigned

comment:2 Changed 9 years ago by martinkou

I've found a more reliable way (but not 100% reliable) of reproducing the bug in Firefox:

  1. Open sample01.html.
  2. Enable "Show Blocks". (this step is optional, but makes the procedure easier to follow)
  3. Press Ctrl-A to select all.
  4. Press Del to delete everything.
  5. Now the caret should flash before the <p> padding block.
  6. Add a "TM" character via the special characters dialog.
  7. Now the caret should flash below the "TM" character and just before the <p> block.
  8. Press Up, End, caret should now flash just after "TM".
  9. Press backspace. If you're lucky, it wouldn't work.
  10. What if it works? Refresh the page and try again.

While having the caret in step 4 and 5 located before the <p> block seems to make it easier for the bug to manifest, this condition is definitely not the necessary condition for the bug to appear. I've seen "immortal" TM characters inside paragraphs, it's just that they appear less frequently.

I've also tried disabling FCKEnterMode.prototype.DoBackspace() and DoDelete(), by putting a return at the beginning of the functions. This does nothing in preventing the bug from appearing, so it is likely that this is a bug in Mozilla Midas.

Finally, I've found that, when you encounter the "immortal" special character, you can make it deletable again by typing an alphanumeric character after it and then pressing backspace. This looks very much like one of the selection workarounds we've got for IE.

comment:3 Changed 9 years ago by fredck

It is certainly a Firefox bug. Do you think we can somehow change step 5 in the above comment, having the cursor inside the padding <p>? Maybe we could check that the padding <p> is the only thing in the document, when creating it, and so move the selection right inside of it.

comment:4 Changed 9 years ago by martinkou

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed with [716].

Click here for more info about our SVN system.

Note: See TracTickets for help on using tickets.
© 2003 – 2016 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy