Opened 18 years ago
Closed 18 years ago
#243 closed Bug (fixed)
Form Empties Contents (due to nested <p>'s)
Reported by: | Tom | Owned by: | Frederico Caldeira Knabben |
---|---|---|---|
Priority: | Normal | Milestone: | FCKeditor 2.5 Beta |
Component: | UI : Enter Key | Version: | |
Keywords: | Confirmed HasPatch | Cc: |
Description
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... :)
- Go to the demo. http://www.fckeditor.net/demo
- Press ENTER after the text that is already in the editor.
- Click the form button to add a form container (any data is fine).
- Put the cursor inside the form container and add a text field (any data is fine)
- Press ENTER after the text field.
- 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)
Change History (5)
comment:1 Changed 18 years ago by
Keywords: | Confirmed added |
---|---|
Milestone: | → FCKeditor 2.5 |
comment:2 Changed 18 years ago by
Keywords: | HasPatch added |
---|
comment:3 Changed 18 years ago by
Owner: | set to Frederico Caldeira Knabben |
---|---|
Status: | new → assigned |
comment:4 Changed 18 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed with [308].
Click here for more info about our SVN system.
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.