mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 09:39:57 +00:00
Scoll to the recipe card after selecting a recipe on mobile devices (closes #547)
This commit is contained in:
parent
06fe308f31
commit
3af5bd8e29
@ -9,6 +9,7 @@
|
||||
### Recipe improvements/fixes
|
||||
- Optimized the ordering of the inputs on the recipe ingredient edit page (moved "Only check if a single unit is in stock" before the amount)
|
||||
- Variable ingredient amounts are now marked accordingly on the renedered recipe
|
||||
- After selecting a recipe on mobile devices, the page now automatically scrolls to the recipe card
|
||||
- Fixed that when editing a recipe ingredient which had "Only check if a single unit is in stock" set, not any quantity unit could be picked and the amount stayed empty
|
||||
- Fixed that when reloading the "new recipe"-page (or when it gets auto-reloaded due to "Auto reload on external changes" is enabled), for each reload a new recipe was created
|
||||
- Fixed that the recipe "fullscreen card" was not correctly displayed
|
||||
|
@ -26,7 +26,16 @@ if (typeof recipe !== "undefined")
|
||||
|
||||
var cardId = "#recipe-card-" + recipe;
|
||||
$(cardId).addClass("bg-primary").addClass("text-white");
|
||||
$(cardId)[0].scrollIntoView();
|
||||
|
||||
if ($(window).width() < 768)
|
||||
{
|
||||
// Scroll to recipe card on mobile
|
||||
$("#selectedRecipeCard")[0].scrollIntoView();
|
||||
}
|
||||
else
|
||||
{
|
||||
$(cardId)[0].scrollIntoView();
|
||||
}
|
||||
}
|
||||
|
||||
if (GetUriParam("search") !== undefined)
|
||||
|
Loading…
x
Reference in New Issue
Block a user