Opened 16 years ago
Closed 16 years ago
#9042 closed defect (bug) (wontfix)
Duplicate id "comment_parent" when using TinyMCE on comments
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | major | Version: | 2.7 |
Component: | TinyMCE | Keywords: | needs-patch |
Focuses: | Cc: |
Description
When adding a tinymce editor to the comments tinymce adds the wysiwyg editor to the dom inside a new span element. This span element automatically gets the id "{textarea_id}_parent" which in case of the comment textarea is "comment_parent".
The new comment form in wp2.7 also requires a hidden input field "comment_parent" for the threaded comments (and inline reply) to work.
Having the same id twice is (apart from being invalid according to w3c standards) causing problems with the tinymce integration...
Attachments (1)
Change History (11)
#1
@
16 years ago
- Component changed from General to JavaScript
- Keywords needs-patch added; tinymce comment domid removed
- Milestone changed from 2.7.2 to 2.8
- Owner changed from anonymous to azaozz
#5
@
16 years ago
- Keywords needs-testing added
this might break the js that sets that field's value when the comment form is moved around when threaded comments are enabled.
#6
@
16 years ago
- Keywords 2nd-opinion added; needs-testing removed
tested it and you are perfectly right, that broke the moving around of the comment form. i updated the patch sothat the movement of the form works as intended.
tested.
#8
@
16 years ago
Don't think there's an easy way to do this. Changing the id would break all themes that use custom js for replying to threaded comment. On the other hand the parent id is hard-coded in TinyMCE...
Perhaps the right way would be to change it only when adding TinyMCE on the comment's textarea (the default comment-reply.js can be overwritten then).
#9
follow-up:
↓ 10
@
16 years ago
- Keywords needs-patch added; has-patch tested commit removed
k, so we'd need to make sure this can be done with a plugin.
#10
in reply to:
↑ 9
@
16 years ago
- Milestone 2.8 deleted
- Resolution set to wontfix
- Status changed from new to closed
Replying to Denis-de-Bernardy:
k, so we'd need to make sure this can be done with a plugin.
All that's needed is a filter on comment_id_fields()
I think. The same can be done from js even easier though, not sure if it's worth filtering the template tag:
document.getElementById('comment_parent').id = 'new_id';
Patch: Prevent potential ID collision with TinyMCE Integration (Frontend).
Easy.