Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

make sure no spine event handlers return false

  • Loading branch information...
commit 8ddf1af3a2060f0f448d9d4f270b5b3b43953f5a 1 parent 1b762f8
@maccman authored
View
10 public/assets/application.js
@@ -10044,12 +10044,18 @@ if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
};
Controller.prototype.delegateEvents = function(events) {
- var eventName, key, match, method, selector, _results;
+ var eventName, key, match, method, selector, _results,
+ _this = this;
_results = [];
for (key in events) {
method = events[key];
if (typeof method !== 'function') {
- method = this.proxy(this[method]);
+ method = (function(method) {
+ return function() {
+ _this[method].apply(_this, arguments);
+ return true;
+ };
+ })(method);
}
match = key.match(this.eventSplitter);
eventName = match[1];
View
6 vendor/assets/javascripts/spine.coffee
@@ -423,8 +423,12 @@ class Controller extends Module
delegateEvents: (events) ->
for key, method of events
+
unless typeof(method) is 'function'
- method = @proxy(@[method])
+ # Always return true from event handlers
+ method = do (method) => =>
+ @[method].apply(this, arguments)
+ true
match = key.match(@eventSplitter)
eventName = match[1]
Please sign in to comment.
Something went wrong with that request. Please try again.