简体   繁体   中英

Scriptaculous Ajax.InPlaceEditor: How to trigger cancel action?

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM