From e4d71e3fd8b52a710d41492d75bc302aedb2dd97 Mon Sep 17 00:00:00 2001 From: Jean Lecordier <47030586+jlecordier@users.noreply.github.com> Date: Tue, 8 Dec 2020 19:56:43 +0100 Subject: [PATCH 1/2] prevent anno buttons from submitting form type='button' is mandatory or it acts as a submit button by default --- anno.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }; From ed6e6077dcc6ab4061517279df47a930d5d95f24 Mon Sep 17 00:00:00 2001 From: Jean Lecordier <47030586+jlecordier@users.noreply.github.com> Date: Tue, 23 Nov 2021 23:28:27 +0100 Subject: [PATCH 2/2] fix button type in coffee file --- src/anno.litcoffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) )