#211 closed Bug (fixed)
Firefox: Unclosed <p> tag results in cursor not showing up and can't focus into editor
Reported by: | Brian Klug | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | FCKeditor 2.4.1 |
Component: | General | Version: | FCKeditor 2.4 |
Keywords: | Confirmed Firefox | Cc: |
Description
- Load demo @ http://www.fckeditor.net/demo or from SVN
- Switch to source mode and enter the following:
<p>
- Switch back to normal mode
The cursor disappears. You can't focus into editor.
Do I win a prize for "shortest markup that causes a bug"? :)
Change History (7)
comment:1 Changed 18 years ago by
Keywords: | Confirmed added |
---|---|
Version: | → FCKeditor 2.4 |
comment:2 follow-up: 3 Changed 18 years ago by
It a Firefox bug on editing mode.
Ok! We will work around the bug. For us, the problem happens when the editor is first loaded with a <p>
. We'll just make sure that doesn't happen. I haven't been able to reproduce the bug any other way.
We expect that people who uses it to have a minimum "respect for our dear HTML".
Hmmm, have you been drinking? :)
In seriousness, most of our users don't even know what HTML is, let alone will ensure valid HTML at all times. The problem really comes when users cut & paste richtext from other applications. The MS-Word paste detection is nice, but only works with IE as you know. Also, it is possible to copy invalid markup from a web page, I suspect.
But that is just for discussions sake - we'll workaround this bug.
comment:3 Changed 18 years ago by
Milestone: | → FCKeditor 2.4.1 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Replying to dustball:
It a Firefox bug on editing mode.
Ok! We will work around the bug. For us, the problem happens when the editor is first loaded with a
<p>
. We'll just make sure that doesn't happen. I haven't been able to reproduce the bug any other way.We expect that people who uses it to have a minimum "respect for our dear HTML".
Hmmm, have you been drinking? :)
Yes... I think I was really drunk when I wrote it :)))
In seriousness, most of our users don't even know what HTML is, let alone will ensure valid HTML at all times. The problem really comes when users cut & paste richtext from other applications. The MS-Word paste detection is nice, but only works with IE as you know. Also, it is possible to copy invalid markup from a web page, I suspect.
It could happen to have bad code, but I really don't believe it is related with the "<p>" case. The only way you will find to reproduce it is to paste it in the source view, or load it at startup, "from a source not generated with FCKeditor". The editor will never produce "<p>". Please correct me if I'm wrong.
But that is just for discussions sake - we'll workaround this bug.
Well... it seams that the fix for it is just a simple "?" addition in a regular expressions. So here it is: fixed with [197].
comment:4 Changed 18 years ago by
It could happen to have bad code, but I really don't believe it is related with the "<p>" case. The only way you will find to reproduce it is to paste it in the source view, or load it at startup, "from a source not generated with FCKeditor". The editor will never produce "<p>". Please correct me if I'm wrong.
You are right. I was thinking of other cases.
Thanks for the fix!
comment:5 Changed 18 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
This fix has made it impossible to load the editor in Firefox with just some comment or anything that will get protected (scripts, special markup) and converted into a comment.
Switch to source mode and add this:
<!-- test -->
switch back to WYSIWYG and the content is just a <br>, I would suggest to change the EmptyParagraph regexp to
/^<(\w+)[^>]*>\s*(<\/\1>)?$/
as a way to avoid messing with comments.
comment:6 Changed 18 years ago by
The proposed regexp will still make lose the contents if it's for example just an image.
comment:7 Changed 18 years ago by
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Thanks for the comments Alfonso. It should have been now fixed with [247].
Confirmed with FF2. Ok with IE.
Replying to dustball:
You should remove the source button for users who insert that kind of markup in the editor :) We expect that people who uses it to have a minimum "respect for our dear HTML".
For now, just start typing and you will see that the cursors will magically appear. It a Firefox bug on editing mode.
You certainly won it :)