#243 new
Sam Grönblom

Ajax.InPlaceEditor seems to call the onComplete callback also when simply cancelling an InPlaceEditor

Reported by Sam Grönblom | September 15th, 2009 @ 09:22 AM

I got an error about an undefined transport (the Ajax.Response object) parameter in my onComplete function for an InPlaceEditor. Since the callback is named onComplete you would assume it would follow the same conventions as the standard Ajax options callbacks. "When used on individual instances, all callbacks (except onException) are invoked with two parameters: the XMLHttpRequest object and the result of evaluating the X-JSON response header, if any (can be null)."

However, when you simply cancel an editor there is no request made and therefore no transport parameter. I noticed that the Ajax.InPlaceEditor calls handleFormCancellation which calls wrapUp which calls _boundComplete. The problem was easily circumvented by just testing if (transport) in my onComplete callback, but it still seems wrong that IPE works this way.

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

script.aculo.us is an open-source JavaScript framework for visual effects and interface behaviours.

Source available from github
The Git repository resides at:
http://github.com/madrobby/scriptaculous

Check out the current development trunk with:
git clone git://github.com/madrobby/scriptaculous.git

As script.aculo.us 1.xx is feature-frozen, this development trunk is for bugfixes only.

New development should happen only for
script.aculo.us 2.

Creating a bug report
When creating a bug report, be sure to include as much relevant information as possible. Post a an example that shows off the problem. Preferably, alter the unit tests and show through either changed or added tests how the expected behavior is not occuring.

People watching this ticket

Pages