DCT: TinyMCE Rich Text Field - onItemChange not triggering on Save
I have a DCT that requires the user to click on a callout button any time the user changes any of the data in the form. The callout does some behind-the-scenes validation of the data and some other fun stuff. I have the typical "onItemChange" event handlers set up for each form field, and it's working as expected, except for rich text fields (TinyMCE). When I modify a standard text field (not TinyMCE) and then click Save, the onItemChange event is triggered and it displays a pop-up telling the user they need to first click the Validate button (the callout). However when a rich text field is modified (TinyMCE) and then the user click Save, the Save event just does the Save functionality. The onItemChange function is never called.
This is a huge bummer. I can't quite figure out a workaround yet. I have opened a case - this smells like a bug to me. But I need this to work in the meantime. I have tried to use the item.oldValue property to compare that value to item.getValue(), but item.oldValue is coming back as "undefined".
Has anyone had to deal with this? Any ideas on how to hijack the Save process and figure out if the TinyMCE fields have changed since the form was opened?
EDIT: This seems to be happening in Firefox only. And if I change something in the rich text entry field, then change the focus to another form field (not changing any data, just clicking inside another field), then clicking Save invokes the onItemChange event handler for the original rich text field. Weirdness.
EDIT 2.0: We found a workaround by saving the value of all rich text fields upon form entry, then on the Save event, see if the current values are different for any of the rich text fields. If any are different, handle it.
Categories
- All Categories
- Cloud Editions
- 1 Thrust Services
- cat as link
- 1 Core SaaS Application development
- 10 Developer Announcements
- 15 General Questions
- 33.4K TeamSite
- 141 Application Governance & Archiving
- 15.2K Designing Analytics Reports
- 1K DevShare Downloads
- Core SaaS Applications
- nested parent
- 4.3K Developing Analytics Applications
- 8.8K Documentum Developer Forum
- Media Management developer
- 159 Transactional Content Processing (TCP)
- 1.7K Web Experience Management
- 55 Tempo Social
- 1 XM Fax