Opened 18 years ago
Closed 18 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: |
Description
- Load sample01.html;
- Place the cursor at the end of the paragraph;
- 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 18 years ago by
Priority: | Normal → High |
---|
comment:2 Changed 18 years ago by
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
367 367 368 368 if ( FCKBrowserInfo.IsGeckoLike ) 369 369 { 370 eNewBlock.innerHTML = GECKO_BOGUS ;370 eNewBlock.innerHTML = 'Test' + GECKO_BOGUS ; 371 371 372 372 // If the entire block is selected, let's add a bogus in the start block. 373 373 if ( bIsStartOfBlock )
So, it seams that we should wait for a fix at Opera's side.
comment:3 Changed 18 years ago by
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 18 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
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.
This is definitely a showstopper. I'm trying to understand it, raising priority meanwhile.