Closed
Bug 305893
Opened 19 years ago
Closed 19 years ago
Hitting enter inserts <br/> in dynamic textarea editors such as FCKEditor or Spaw, instead of closing a paragraph
Categories
(Core :: DOM: Editor, defect)
Core
DOM: Editor
Tracking
()
RESOLVED
DUPLICATE
of bug 285873
People
(Reporter: d.drury, Unassigned)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6 Many CMS use dynamic text editors such as FCKEditor (http://www.fckeditor.net/) or Spaw (http://www.solmetra.com/en/disp.php/en_products/en_spaw/en_spaw_intro) in order to add HTML fragments to CMS documents. When entering a newline in these editors (hitting Enter on the keyboard) Firefox inserts a <br/> tag, whereas Internet Explorer ends the current paragraph and starts a new one (in IE to add a <br/> tag you hit Shift+Enter). In Firefox there is no way to enter a new paragraph without manually editing the HTML code. Fixing this bug so Firefox behaves like Internet Explorer (and the majority of word processors) would make Firefox much more useful as the interface for many Web Applications, particularly CMS. Although at first this may appear to be a bug in the Editors discussed, it is apparently to do with what Firefox does with keystrokes it captures. Reproducible: Always Steps to Reproduce: 1. Load one of the specified editors into Firefox (eg http://www.fckeditor.net/demo/default.html) 2. Wait for it to completely load. 3. Enter text in the editor hitting enter at least once 4. Use the editors view source function to see the resultant HTML output Actual Results: Output is one continual block with inline linebreaks Foo<br/> Bar<br/> Expected Results: Output is split into multiple paragraphs <p>Foo</p> <p>Bar</p>
Updated•19 years ago
|
Component: Form Manager → Editor
OS: Windows XP → All
Product: Firefox → Core
Hardware: PC → All
Version: unspecified → Trunk
Comment 1•19 years ago
|
||
See bug 92686 and bug 285873. Although both of them are marked "FIXED", Enter still inserts a <BR> for me on recent nightlies in the sites linked from comment #0. What gives?
Comment 2•19 years ago
|
||
This works for me: http://www.mozilla.org/editor/midasdemo/, switch on "View HTML Source", enter <p>aaa</p>, switch off "View HTML Source", position cursor after aaa, hit enter, switch on "View HTML Source", you'll see that the current paragraph is closed and a new one inserted.
That isn't quite what is necessary. For some people editing source is fine, but for the majority, they NEED something that works like Word etc. A plain old textarea is fine for editing HTML directly.
Comment 4•19 years ago
|
||
Then you need to describe the bug better: "When entering a newline in these editors (hitting Enter on the keyboard) Firefox inserts a <br/> tag, whereas Internet Explorer ends the current paragraph and starts a new one (in IE to add a <br/> tag you hit Shift+Enter)" Firefox ends the current paragraph if there is one.
Really? I didn't mention anything about viewing source, and surely the majority of people aren't going to switch on source and edit it manually... What you say might work for you, but it isn't a particularly obvious workaround as far as I can see. This has been discussed till its eyes bulge in bug 92686 and bug 285873 (which I was unaware of until Uri Bernstein mentioned them above) but is still an unfixed problem limiting Firefox's usefullnes working with many CMS existing and to come. It seems that we were so close to having this work, but it doesn't!
Comment 6•19 years ago
|
||
So are you saying if the source is empty we should create a paragraph? Please try to clarify what the bug is, bug 285873 specifically *fixed* closing a paragraph (and creating a new one) if there is one instead of inserting <br>.
Steps to Reproduce:
1. Load one of the editors specified above into Firefox.
2. Wait for it to completely load.
3. Enter text in the editor hitting enter at least once.
4. Use the editors view source function to see the resultant HTML output.
I get <br/> for each time I hit enter, rather than paragraphs.
And then try this:
1. Go into HTML view. Enter <p>This is a paragraph</p>
2. Return to "design" view.
3. Put cursor in the middle of the sentence.
4. Hit enter.
5. Return to HTML view.
I get <p>This is a<br/>
paragraph</p>
As you can see, hitting enter in Firefox always creates a newline. The
behaviour that was supposed to be fixed for bug 285873 is still there.
Comment 8•19 years ago
|
||
(In reply to comment #7) > And then try this: > > 1. Go into HTML view. Enter <p>This is a paragraph</p> > 2. Return to "design" view. > 3. Put cursor in the middle of the sentence. > 4. Hit enter. > 5. Return to HTML view. > > I get <p>This is a<br/> > paragraph</p> > > As you can see, hitting enter in Firefox always creates a newline. The > behaviour that was supposed to be fixed for bug 285873 is still there. This WFM (i.e. a </p><p> is inserted) on: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b4) Gecko/20050825 Firefox/1.0+ DunxD - what build are you using?
The one listed in my original comment: Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6
Comment 10•19 years ago
|
||
So this is a duplicate. Bug 285873 was fixed on the trunk after Firefox 1.0 was released. *** This bug has been marked as a duplicate of 285873 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
| Reporter | ||
Comment 11•19 years ago
|
||
Sorry, I don't quite understand. This might be a duplicate of that bug, but since I am still getting it on the most recent version of Firefox doesn't that mean that the bug it is a duplicate of is not fixed? Or will it be included in the next release of Firefox?
You need to log in
before you can comment on or make changes to this bug.
Description
•