Ticket #2519 (closed Bug: fixed)
Firefox 3 form submit via javascript with multiple editor instances
| Reported by: | ccarey | Owned by: | martinkou |
|---|---|---|---|
| Priority: | High | Milestone: | FCKeditor 2.6.4 |
| Component: | General | Version: | FCKeditor 2.6.3 |
| Keywords: | Confirmed Firefox Review+ | Cc: | ccarey@… |
Description
Summary:
If you create a form which contains multiple instances of the FCK Editor, Firefox3 will only send updates to one of the instances if you submit the form via javascript (form.submit()). Submitting the same form via a "native" submit button (input type="submit") will send the form as expected.
See sample form attached (modified sample file as detailed below)
Steps to replicate:
1. Open the sample09.html bundled with the editor
fckeditor/_samples/html/sample09.html
2. Edit the sample code to add a second button at the bottom which submits the form via javascript
<input type="submit" value="Submit (button)" /> <input type="button" value="Submit (javascript)" onclick="document.testform.submit()"/>
3. Run the sample in firefox 3.0.1
4. Edit the values in both editor regions to "XX" and submit the form using "native" submit button. Notice that the receiving page shows the correct data ("XX").
5. run the sample again and change the field values to "YY" and submit the form using the javascript button. Notice that the receiving page shows only one of the regions updated (i.e. the first region shows "YY" and the other shows the default value)
Notes
- tested in version 2.6.3 and nightly build (2008-09-02)
- behaviour not present in IE7 or FF2.x
- Inspecting the hidden "value" field at the point where the form is submitted (FF3) shows the value only being updated for one instance of the editor at a time.
It's a bit of an issue if you're using external validation (like qForms) or if the page design requires that the activation buttons for the form are outside the form boundaries.
