Opened 17 years ago

Closed 16 years ago

#214 closed Bug (fixed)

Opera: Enter at the end of paragraph doesn't move the caret

Reported by: Frederico Caldeira Knabben Owned by:
Priority: Must have (possibly next milestone) Milestone: Opera Compatibility
Component: UI : Enter Key Version: FCKeditor 2.4
Keywords: Confirmed Opera Cc:


  1. Load sample01.html;
  2. Place the cursor at the end of the paragraph;
  3. Hit <Enter>.

The cursor will move to the start of the paragraph. The new paragraph is created in any case (just use the keyboard to move to it).

Change History (4)

comment:1 Changed 16 years ago by Hallvord R. M. Steen (Opera Software)

Priority: NormalHigh

This is definitely a showstopper. I'm trying to understand it, raising priority meanwhile.

comment:2 Changed 16 years ago by Frederico Caldeira Knabben

This one seams to be related to Opera's bug 260814:

It seams that it is not possible to programmatically place the selection inside an empty tag (not even with a <br> inside it).

The following change in the code (at r253) shows that the caret is correctly placed if we have some text in the paragraphs created with enter.

  • editor/_source/classes/fckenterkey.js

    368368                                                if ( FCKBrowserInfo.IsGeckoLike )
    369369                                                {
    370                                                         eNewBlock.innerHTML = GECKO_BOGUS ;
     370                                                        eNewBlock.innerHTML = 'Test' + GECKO_BOGUS ;
    372372                                                        // If the entire block is selected, let's add a bogus in the start block.
    373373                                                        if ( bIsStartOfBlock )

So, it seams that we should wait for a fix at Opera's side.

comment:3 Changed 16 years ago by Hallvord R. M. Steen (Opera Software)

The problem with placing the cursor in an empty element might be too complicated to fix for Opera 9.5. What about adding an empty text node?

After or instead of the GECKO_BOGUS line quoted above, do eNewBloc.appendChild(document.createTextNode());

comment:4 Changed 16 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: newclosed

That worked well Hallvord! Wonderful! Even better as we don't have to use the ugly GECKO_BOGUS hack.

Fixed with [384].

Click here for more info about our SVN system.

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