Ticket #1095 (closed Bug: fixed)

Opened 3 years ago

Last modified 3 years ago

Backspace does not work in Opera

Reported by: martinkou Owned by: martinkou
Priority: High Milestone: Opera Compatibility
Component: UI : Enter Key Version: SVN (FCKeditor)
Keywords: Confirmed Opera Cc: hallvord@…

Description

Reproduction procedure:

  1. Open sample01.html in Opera.
  2. Place the caret to the end of the document.
  3. Press backspace a few times.
  4. The caret jumps around while deleting characters.

The bug does not occur in 2.4.3.

Attachments

OperaJumpingCaret.html Download (0.7 KB) - added by martinkou 3 years ago.
Test case for Opera bug

Change History

Changed 3 years ago by martinkou

  • component changed from General to UI : Enter Key

Oops... this bug actually occurs in 2.4.3 as well. But the changeset [705] has made it more visible in the samples since it enabled the bug to appear right after the editor is loaded.

Reproduction procedure for all versions:

  1. Open sample01.html in Opera.
  2. Press the "Source" button twice.
  3. Place the caret to the end of the document.
  4. Press backspace a few times.
  5. The caret jumps around while deleting characters.

Changed 3 years ago by fredck

  • milestone changed from FCKeditor 2.5 to Opera Compatibility

Changed 3 years ago by martinkou

I've traced the error to line 230 of classes/fckw3crange.js:

                        endNode = endNode.splitText( endOffset ) ;

I found that calling TextNode.splitText() in Opera would make the caret jump around inside a block element. This seems like an Opera bug as no other browser would do that.

I've made a very simple test case to demonstrate the problem.

Changed 3 years ago by martinkou

Test case for Opera bug

Changed 3 years ago by martinkou

  • status changed from new to assigned

Changed 3 years ago by martinkou

I've committed to proposed fix in [717], it seems to fix the cursor jumping problem. However, I don't really understand what the function that I've changed (FCKW3CRange._ExecContentsAction) is actually doing, so my changes could possibly cause other bugs.

Changed 3 years ago by fredck

Martin, I've reverted [717], including a simpler fix for this ticket. It worked for me here, so if you feel it is ok, you can close this ticket.

_ExecContentsAction is quite a complex function. It runs the deleteContents, extractContents and cloneContents functions, as they have a very similar logic.

Ranges, have nothing to do with the selection, so we should not make selection changes there. At the same time, we must be aware that ranges manipulation may interfere with the selection, and so we should fix it when needed "in the calling code". It has been done for Firefox, so we're just doing the same for Opera now.

Changed 3 years ago by fredck

  • cc hallvord@… added

CCing Hallvord, so he can consider Martin's test case.

Changed 3 years ago by fredck

Opss... I've just found out that this is a DUP of #571. So, you can close that one too Martin.

Changed 3 years ago by martinkou

  • status changed from assigned to closed
  • resolution set to fixed

Yes, the changes in [718] works well for me. Closing ticket.

Note: See TracTickets for help on using tickets.