0

Certainly it must be possible to fire the cancel action on an Ajax.InPlaceEditor without clicking the Cancel button. But I just cannot figure out how to do it.

Any suggestions?

yalestar
  • 9,334
  • 6
  • 39
  • 52

1 Answers1

0

Just went though scriptaculous source, and found it:

  • When you hit cancel, it triggers handleFormCancellation, that triggers wrapUp, that triggers leaveEditMode and onComplete callback.

Thing is, wrapUp is defined as:

 wrapUp: function(transport)

so you can pass null as transport when calling it.

leaveEditMode is parameter-less so, you don't need to worry about null values in callbacks. Although, guess any of this two should work.

wtaniguchi
  • 1,324
  • 14
  • 22