From ac9d4f9584ff0efbe2bd6cabb70cc791609b7b4e Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Wed, 15 Feb 2012 17:04:29 +0100 Subject: [PATCH] Rename the id of the text widgets because there can be css-id clashes with the text field of documents when using TinyMCE in overlays or multiple instances of TinyMCE on a single page. --- CHANGES.txt | 5 +++++ plone/app/discussion/browser/comments.py | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 3082180..9fbd808 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -9,6 +9,11 @@ Changelog fullname. [timo] +- Rename the id of the text widgets because there can be css-id clashes with + the text field of documents when using TinyMCE in overlays or multiple + instances of TinyMCE on a single page. + [timo] + 2.1.8 (unreleased) ------------------ diff --git a/plone/app/discussion/browser/comments.py b/plone/app/discussion/browser/comments.py index 743e00e..1eddf0a 100644 --- a/plone/app/discussion/browser/comments.py +++ b/plone/app/discussion/browser/comments.py @@ -94,6 +94,11 @@ class CommentForm(extensible.ExtensibleForm, form.Form): self.widgets['text'].addClass("autoresize") self.widgets['user_notification'].label = _(u"") + # Rename the id of the text widgets because there can be css-id + # clashes with the text field of documents when using and overlay + # with TinyMCE. + self.widgets['text'].id = "form-widgets-comment-text" + # Anonymous / Logged-in mtool = getToolByName(self.context, 'portal_membership') if not mtool.isAnonymousUser():