Fixed that the recipe page was reloaded when expanding a collapsed row on mobile (fixes #589)

This commit is contained in:
Bernd Bestel
2020-03-06 20:51:09 +01:00
parent e2bb3a7d00
commit 5cfe7cf34d
2 changed files with 6 additions and 1 deletions

View File

@@ -208,7 +208,11 @@ recipesTables.on('select', function(e, dt, type, indexes)
if (type === 'row')
{
var selectedRecipeId = $(recipesTables.row(indexes[0]).node()).data("recipe-id");
window.location.href = U('/recipes?recipe=' + selectedRecipeId.toString());
var currentRecipeId = location.search.split('recipe=')[1];
if (selectedRecipeId.toString() !== currentRecipeId)
{
window.location.href = U('/recipes?recipe=' + selectedRecipeId.toString());
}
}
});