Opened 18 years ago

Closed 17 years ago

#332 closed Bug (fixed)

Hitting Enter after links continues the link in the new paragraph

Reported by: hanki_pank Owned by: Martin Kou
Priority: Normal Milestone: FCKeditor 2.5 Beta
Component: UI : Enter Key Version: FCKeditor 2.4.2
Keywords: Confirmed Firefox SD-COE Cc: pkdille, Jean-Marc Libs, Nyloth

Description (last modified by Frederico Caldeira Knabben)

Handling of <a>-Tags within <li> is broken. Reproduction at the nightly build just right now :

  1. Hit return for a new line.
  2. Press "Insert Bulleted list" - Button
  3. Press "Insert Link" - Button
  4. enter www.blah.org as target and hit return to return back to gui
  5. Hit return to get new bullet.
  6. type "asd"

provides as source :

<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>
<ul>
    <li><a href="http://www.blah.org">www.blah.org</a></li>
    <li><a href="http://www.blah.org">asd</a></li>
</ul>
<p>&nbsp;</p>

Meaning, the <a>-Tag from the first bullet has been inherited by the second one, which is not what users expect, I guess.

Change History (17)

comment:1 Changed 18 years ago by hanki_pank

Here a more readable version....

Handling of <a>-Tags within <li> is broken.

Reproduction at the nightly build just right now :

  1. Hit return for a new line.
  2. Press "Insert Bulleted list" - Button
  3. Press "Insert Link" - Button
  4. enter www.blah.org as target and hit return to return back to gui
  5. Hit return to get new bullet.
  6. type "asd"

provides as source :

<p>This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>
<ul>
    <li><a href="http://www.blah.org">www.blah.org</a></li>
    <li><a href="http://www.blah.org">asd</a></li>
</ul>
<p>&nbsp;</p>

Meaning, the <a>-Tag from the first bullet has been inherited by the second one, which is not what users expect, I guess.

comment:2 Changed 18 years ago by Frederico Caldeira Knabben

Keywords: Confirmed Firefox added
Milestone: FCKeditor 2.5
Version: FCKeditor 2.4.2

Confirmed with FF2. Ok with IE6.

comment:3 Changed 18 years ago by Frederico Caldeira Knabben

Related to #393 (Maybe a DUP).

comment:4 Changed 17 years ago by Frederico Caldeira Knabben

Cc: Pascal.KUSTNER@… added
Description: modified (diff)
Keywords: SD-COE added
Summary: <a> whitn <li>Hitting Enter after links continues the link in the new paragraph

It doesn't happen with lists only. Any kind of block with ends with a link will present the same problem.

For example:

  1. Load <p><a href="http://www.fckeditor.net/">FCKeditor</a></p> in the source.
  2. In WYSIWYG, click after "FCKeditor" and hit Enter.
  3. Type "Test".

You have this output:

<p><a href="http://www.fckeditor.net/">FCKeditor</a></p>
<p><a href="http://www.fckeditor.net/">Test</a></p>

While the expected is:

<p><a href="http://www.fckeditor.net/">FCKeditor</a></p>
<p>Test</p>

comment:5 Changed 17 years ago by Frederico Caldeira Knabben

Cc: jean-marc.libs@… patrice.weber@… added

comment:6 Changed 17 years ago by Frederico Caldeira Knabben

Cc: pkdille Jean-Marc Libs Nyloth added; Pascal.KUSTNER@… jean-marc.libs@… patrice.weber@… removed

comment:7 Changed 17 years ago by Martin Kou

Owner: set to Martin Kou
Status: newassigned

comment:8 Changed 17 years ago by Frederico Caldeira Knabben

Component: GeneralUI : Enter Key

comment:9 Changed 17 years ago by Martin Kou

Resolution: fixed
Status: assignedclosed

I found the fixes to #393 (i.e. the changesets [596], [597], [598], [599]) to have also fixed this ticket. I can no longer reproduce the bug in the current SVN build.

comment:10 Changed 17 years ago by Jean-Marc Libs

Resolution: fixed
Status: closedreopened

I just tested on http://www.fckeditor.net/nightly/fckeditor/_samples/default.html and the bug is still present.

What I did: 1/ hit return 2/ click on "bulleted list" 3/ click on "Insert/Edit Link", then enter "www.example.com" in the pop-up and click OK 4/ set cursor on end of line, hit "return" 5/ a second bullet appears, I type jhjfgfg and this new text has inherited the link to www.example.com :-(

This is on FF 1.5 I did not test on IE6 because today's demo URL just shows garbage on my IE6

comment:11 Changed 17 years ago by Martin Kou

I'm quite sure that you're having old cached JavaScript code in your browser, because when I tested the nightly build page on Firefox 1.5, the whole editor didn't even appear. (I've just fixed this problem in [730], by the way.)

I then tested the same nightly build page with Firefox 2, with your procedure, and the bug did not appear. Testing build 730 on Firefox 1.5 also did not invoke the bug.

http://www.youtube.com/watch?v=SUtl3opGVqE

Maybe you should try to clear the local cache of your browser first, and reload the nightly test page and see if the bug is still there. r730 probably wouldn't appear on the nightly test page until late tonight, so if you completely reload the nightly page with Firefox 1.5 the editor wouldn't work. You can still test it with a Portable Firefox 2, however.

comment:12 Changed 17 years ago by Frederico Caldeira Knabben

With FF2, I'm able to reproduce the problem, by following the precise steps described by Jyhem.

comment:13 Changed 17 years ago by Martin Kou

Ok I see what's wrong now. The bug is triggered when the caret position is set to the end by the mouse. Previously I set the caret position to the end by the keyboard which didn't trigger the bug.

comment:14 Changed 17 years ago by Martin Kou

Resolution: fixed
Status: reopenedclosed

Fixed with [742].

Click here for more info about our SVN system.

comment:15 Changed 17 years ago by Aleksey Onopriyenko

Resolution: fixed
Status: closedreopened

This bug is not fixed for Opera 9.5 alpha (build 9500) and Opera 9.23

comment:16 Changed 17 years ago by Martin Kou

Applying the same kludge in Gecko to Opera fixes the problem but results in another bug. With the kludge on, whenever the caret is at the end of an anchor link, the caret cannot be moved by the left arrow key. Also, an extra backspace would be needed to delete the last character in the anchor link.

comment:17 Changed 17 years ago by Martin Kou

Resolution: fixed
Status: reopenedclosed

Fixed with [812] and [813].

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