diff --git a/anno.js b/anno.js index 4a20e85..b6a9ad8 100644 --- a/anno.js +++ b/anno.js @@ -529,7 +529,7 @@ AnnoButton = (function() { } AnnoButton.prototype.buttonElem = function(anno) { - return $("").html(this.textFn(anno)).addClass(this.className).click((function(_this) { + return $("").html(this.textFn(anno)).addClass(this.className).click((function(_this) { return function(evt) { return _this.click.call(anno, anno, evt); }; diff --git a/src/anno.litcoffee b/src/anno.litcoffee index e5dfe7f..09b44aa 100644 --- a/src/anno.litcoffee +++ b/src/anno.litcoffee @@ -555,7 +555,7 @@ Buttons buttonElem: (anno) -> - return $(""). + return $(""). html( @textFn(anno) ). addClass( @className ). click( (evt) => @click.call(anno, anno, evt) )