Ticket #214 (closed Bug: fixed)

Opened 21 months ago

Last modified 17 months ago

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

Reported by: fredck Owned by:
Priority: High Milestone: Opera Compatibility
Component: UI : Enter Key Version: FCKeditor 2.4
Keywords: Confirmed Opera Cc:

Description

  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

Changed 20 months ago by hallvord@…

  • priority changed from Normal to High

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

Changed 19 months ago by fredck

This one seams to be related to Opera's bug 260814:
https://bugs.opera.com/show_bug.cgi?id=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

     
    367367 
    368368                                                if ( FCKBrowserInfo.IsGeckoLike ) 
    369369                                                { 
    370                                                         eNewBlock.innerHTML = GECKO_BOGUS ; 
     370                                                        eNewBlock.innerHTML = 'Test' + GECKO_BOGUS ; 
    371371 
    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.

Changed 17 months ago by hallvord@…

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

Changed 17 months ago by fredck

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

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.