Opened 17 years ago

Closed 17 years ago

#1095 closed Bug (fixed)

Backspace does not work in Opera

Reported by: Martin Kou Owned by: Martin Kou
Priority: Must have (possibly next milestone) Milestone: Opera Compatibility
Component: UI : Enter Key Version: SVN (FCKeditor) - Retired
Keywords: Confirmed Opera Cc: Hallvord R. M. Steen (Opera Software)

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 (1)

OperaJumpingCaret.html (735 bytes) - added by Martin Kou 17 years ago.
Test case for Opera bug

Download all attachments as: .zip

Change History (10)

comment:1 Changed 17 years ago by Martin Kou

Component: GeneralUI : 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.

comment:2 Changed 17 years ago by Frederico Caldeira Knabben

Milestone: FCKeditor 2.5Opera Compatibility

comment:3 Changed 17 years ago by Martin Kou

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 17 years ago by Martin Kou

Attachment: OperaJumpingCaret.html added

Test case for Opera bug

comment:4 Changed 17 years ago by Martin Kou

Status: newassigned

comment:5 Changed 17 years ago by Martin Kou

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.

comment:6 Changed 17 years ago by Frederico Caldeira Knabben

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.

comment:7 Changed 17 years ago by Frederico Caldeira Knabben

Cc: Hallvord R. M. Steen (Opera Software) added

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

comment:8 Changed 17 years ago by Frederico Caldeira Knabben

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

comment:9 Changed 17 years ago by Martin Kou

Resolution: fixed
Status: assignedclosed

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

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy