Metadata
- Source
- FLUID-2792
- Type
- Bug
- Priority
- Major
- Status
- Closed
- Resolution
- Fixed
- Assignee
- Justin Obara
- Reporter
- Justin Obara
- Created
2009-05-27T15:04:45.000-0400 - Updated
2009-08-07T15:02:03.000-0400 - Versions
-
- 1.1
- Fixed Versions
-
- 1.1.1
- 1.2
- Component
-
- Inline Edit
- Undo
Description
Saving rich text content, without making changes, will still render the undo control
Steps to reproduce:
1) Open the inline edit quick start example
http://build.fluidproject.org/infusion/standalone-demos/quick-start-examples/inlineEdit/html/InlineEdit.html
2) Open one of the rich text inline edit fields into edit mode
3) Immediately save
Notice that the undo control is rendered, even though there are no changes to undo
Environments
FF2, FF3, Opera 9.6, Safari 3.2 (Mac OS 10.5)
Safari 3.2 (Mac OS 10.4)
FF2, FF3, IE6, IE7, IE8, Opera 9.6 (Win XP)
FF3, IE7, IE8 (Win Vista)
IE6 (Win 2000)
Attachments
Comments
-
Justin Obara commented
2009-07-27T16:30:16.000-0400 Bug Parade 1.1.1 release
-
Armin Krauss commented
2009-07-29T11:31:13.000-0400 I think the problem happens in the finish() function
var finish = function (that) {
var newValue = that.editView.value();
var oldValue = that.model.value;var viewNode = that.viewEl[0];
var editNode = that.editField[0];
var ret = that.events.onFinishEdit.fire(newValue, oldValue, editNode, viewNode);
if (ret === false) {
return;
}that.updateModelValue(newValue);
that.events.afterFinishEdit.fire(newValue, oldValue, editNode, viewNode);switchToViewMode(that);
};I expect that
var ret = that.events.onFinishEdit.fire(newValue, oldValue, editNode, viewNode);
if (ret === false) {
return;
}Will do some compare of the Values and decide to return or go on and show undo. The new
and old are different due to "\n" in the old text.new
<p>After a hiatus, <strong>Portishead</strong> is back with their first studio album in 6 years. <em>Third</em> brings back the familiar and the new, and none of this is best exemplified than in the track <em>Machine Gun</em>. It seems that regardless of how <strong>Portishead</strong> sounds now, the one thing that has stayed constant is their refusal to be ordinary.</p>
old
\n <p>After a hiatus, <strong>Portishead</strong> is back with their first studio \n album in 6 years. <em>Third</em> brings back the familiar and\n the new, and none of this is best exemplified than in the track\n <em>Machine Gun</em>. It seems that regardless of how <strong>Portishead</strong> \n sounds now, the one thing that has stayed constant is their refusal to be ordinary.\n </p>\n -
y z commented
2009-07-31T15:04:06.000-0400 the patch properly cleans up the text content of the tag that is being loaded into the editor the first time.
-
Antranig Basman commented
2009-08-04T16:38:58.000-0400 Thanks for this patch, applied at revision 7706
-
Antranig Basman commented
2009-08-06T10:43:01.000-0400 Updated patch to account for more wrinkles of whitespace normalisation for TinyMCE
-
Justin Obara commented
2009-08-06T13:48:12.000-0400 It seems to still not be working in IE and Opera
-
Antranig Basman commented
2009-08-07T13:11:17.000-0400 More thorough fix at rev 7730:
Change of strategy to deal with wider category of normalizations for IE, Opera etc. HTML accessor now changed back to previous release, and new configuration of modelComparator allows pluggable change detection strategies.
-
Justin Obara commented
2009-08-07T15:02:03.000-0400 Verified fix using:
FF2, FF3, FF3.5, Opera 9.6, Safari 3.2, Safari 4 (Mac OS 10.5)
FF3, IE7, IE8 (Win Vista)