X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/461c5c048f565ffbc0d9fad72f642c9de8704079..d27f7090b1e9a7909a9ec90302cd3bf732293139:/src/redakcja/static/js/wiki/base.js?ds=inline diff --git a/src/redakcja/static/js/wiki/base.js b/src/redakcja/static/js/wiki/base.js index 3ee92c4b..574dd59b 100644 --- a/src/redakcja/static/js/wiki/base.js +++ b/src/redakcja/static/js/wiki/base.js @@ -250,7 +250,7 @@ /* bind buttons */ function dataUiAction(elem) { - var action = $(this).attr('data-ui-action'); + var action = $(elem).attr('data-ui-action'); console.log("Button pressed, action: ", action); try { @@ -265,7 +265,7 @@ $('button[data-ui-action]', self.$elem).click(function(event) { event.preventDefault(); dataUiAction(this); - }).on('keydown'), function(event) { + }).on('keydown', function(event) { if (event.key == 'Enter') { event.preventDefault(); dataUiAction(this);