Opened 11 years ago
Closed 10 years ago
#11784 closed Bug (expired)
forceEnterMode enabled, enter key does not work well inside lists
Reported by: | Irina | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 4.3.5 |
Keywords: | IBM | Cc: | Satya Minnekanti, Christophe Guillou |
Description
- Open enterkey.html CKEditor.
- Set enter mode to BR.
- Set forceEnterMode to true.
- Click bulleted/numbered list icon.
- Enter first line of text.
- Press enter key.
- Enter second line of text.
Problem: The second line of text is not a new list item.
<ol> <li>line1<br /> line2</li> </ol>
Tested in FF, editor version 4.3.5, revision "a10440f"
This issue might be related to http://dev.ckeditor.com/ticket/5465
Change History (5)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
@Reinmar yes you are right but I really would like to hear Fred's opinion as this is quite interesting/strange case.
First the findings:
Without Force:
2DIVs or 2Ps - New list item is inserted always.
2BRs - Enter key inserts new element but Shift+Enter inserts BR.
IMHO This is expected behaviour although List Plugin or Enter Key logic might have been changed especially for this case.
With Force
2DIVs or 2Ps - New list item is inserted always.
2BRs - Only Brs are inserted.
Although you can't create new list items anymore it looks logical again. You were able to insert new list items without Force and now you insert BRs no matter what.
On the other hand not being able to insert new list elements doesn't look good from user point of view.
NOTE: When you use Force and have enterMode set to BR but shiftEnterMode to P then you can insert new list items on Shift+Enter.
@irina could you tell us what is the real life use case here? Why do you need such settings?
comment:3 Changed 11 years ago by
Status: | new → pending |
---|
The forceEnterMode feature has been designed especially for enter mode P. That's because by default, CKEditor tends to keep the current kind of block, so if you're inside a <div>, you'll be kept inside <div>. By forcing it, this will not happen so <p> is created instead.
The problem is that we also have enter mode BR and so people start abusing of forceEnterMode. I any case, it doesn't make much sense for the to have forceEnterMode when enter mode is BR, so the current workaround should be simply avoiding using forceEnterMode in this case. Wouldn't this be enough?
comment:4 Changed 11 years ago by
I would also say that forceEnterMode is used by SHIFT+ENTER and that's how I understand this option. It can be explained like: "When you press SHIFT then forceEnterMode is being enabled."
How does it apply to this case? When you have a shiftEnterMode==BR and you press SHIFT+ENTER in a list item, you expect that <br> is inserted. So that how enterMode==BR works when forceEnterMode is enabled in the config. So if the intention is not to force enter mode, then it should not be used.
comment:5 Changed 10 years ago by
Resolution: | → expired |
---|---|
Status: | pending → closed |
I believe that this is exactly what 'forceEnterMode' means. That BR will be inserted regardless of context. Kuba, am I right?