Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Changing exercise set fix to use pointerup

Will Pearsonefae1388db73
diff --git a/wger/core/static/js/wger-core.js b/wger/core/static/js/wger-core.js
index be63bc8f0..3d0a9fa95 100644
--- a/wger/core/static/js/wger-core.js
+++ b/wger/core/static/js/wger-core.js
@@ -97,17 +97,6 @@ function wgerSetupSortable() {
});
}
-/*
-Functions related to site performance
-*/
-
-function debounce(func, delay, timer) {
- // Delays calling a function until it hasn't been called for the set delay
- clearTimeout(timer);
- timer = setTimeout(func, delay);
- return timer;
-}
-
/*
Functions related to the user's preferences
*/
@@ -531,10 +520,12 @@ function wgerInitEditSet() {
initRemoveExerciseFormset();
// Slider to set the number of sets
- var setsSliderTimer;
$('#id_sets').on('input', function () {
$('#id_sets_value').html($('#id_sets').val());
- setsSliderTimer = debounce(updateAllExerciseFormset, 250, setsSliderTimer);
+ });
+
+ $('#id_sets').on('pointerup', function () {
+ updateAllExerciseFormset();
});
/*