From ae5c6b84a8f4b8a68be12764d0f47a2ce73ce2f7 Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Sun, 15 Apr 2012 12:40:35 +0200 Subject: [PATCH] fixed webkit error be disable a button --- openslides/static/javascript/utils.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/openslides/static/javascript/utils.js b/openslides/static/javascript/utils.js index 30716a5ce..7dd13317b 100644 --- a/openslides/static/javascript/utils.js +++ b/openslides/static/javascript/utils.js @@ -1,9 +1,13 @@ $(function () { - $('.button').click(function () { + $('.button').click(function (event) { button = $(this); - button.attr('disabled', 'disabled'); - setTimeout(function () { - button.removeAttr('disabled'); - }, 1000); + if (button.hasClass('disabled')) { + event.preventDefault(); + } else { + button.addClass('disabled'); + setTimeout(function () { + button.removeClass('disabled'); + }, 1000); + } }); });