mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Fixed that the recipe page was reloaded when expanding a collapsed row on mobile (fixes #589)
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user