Opened 10 years ago

Closed 9 years ago

#243 closed Bug (fixed)

Form Empties Contents (due to nested <p>'s)

Reported by: tomcraig Owned by: fredck
Priority: Normal Milestone: FCKeditor 2.5 Beta
Component: UI : Enter Key Version:
Keywords: Confirmed HasPatch Cc:


Here's an issue that appeared to be fixed in 2.4 after Frederico noticed it, but it is back to needing repair in 2.4.1. I was JUST getting ready to put out the new version... :)

  1. Go to the demo.
  2. Press ENTER after the text that is already in the editor.
  3. Click the form button to add a form container (any data is fine).
  4. Put the cursor inside the form container and add a text field (any data is fine)
  5. Press ENTER after the text field.
  6. Now click the source button off and on twice to watch the form container "shake out" the element.

I believe it has to do with the form being creatd inside <p> tags and then the form element being placed inside nested <p> tags once ENTER is pressed after it. So when the <p> nesting is being repaired (to make valid) by the editor, it takes the contents with it...not good.

I tried to look up the 2.4 testing forum to find my original post and Frederico's fix post, but I couldn't find the thread (removed?).

Anyway, please, please, repair that again, Frederico.

Thank you, Tom

Attachments (1)

block_split.patch (32.9 KB) - added by fredck 10 years ago.
Proposal patch

Download all attachments as: .zip

Change History (5)

comment:1 Changed 10 years ago by fredck

  • Keywords Confirmed added
  • Milestone set to FCKeditor 2.5

Actually, we were aware about that issue, but no fix has been done for it. The demo is running version 2.4.

We haven't worked on it before because the fix is supposed to come together with the new style system to be developed for the 2.5.

In any case, you message shook my head a little and I had some ideas for a definitive fix. The real problem is that we are creating <form> elements inside <p>, which is not standards compliant and breaks the browser DOM (IE). So, we must do it in a way that block tags are properly inserted. We are talking not only about <form>, but also about <table> and <hr>.

Part of the fix comes from the work done for the new Enter Key handler. I was able to code it properly, but the impact in the core code is huge, so I don't feel comfortable to commit it right now, as version 2.4.1 is supposed to be released next week.

So, for now, I'm attaching a patch for it. As soon as version 2.4.1 is out, I'll be committing it to the trunk.

Changed 10 years ago by fredck

Proposal patch

comment:2 Changed 10 years ago by fredck

  • Keywords HasPatch added

comment:3 Changed 10 years ago by fredck

  • Owner set to fredck
  • Status changed from new to assigned

comment:4 Changed 9 years ago by fredck

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed with [308].

Click here for more info about our SVN system.

Note: See TracTickets for help on using tickets.
© 2003 – 2016 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy