Page 1 of 1

Breadcrumb component scrolls to top of screen

Posted: 09 Mar 2023, 13:28
by cchester
Hi, I am using a Breadcrumb component in my code - when an item is clicked, it updates a child component as expected (using the command: () => {...} method), however at the same time, it scrolls back to the top of the page - this can be a bit disorienting for users, especially on mobile where they may have scrolled quite a way down the page (past various menu options) before clicking on the breadcrumb.
This behaviour happens in the examples given ... https://primevue.org/breadcrumb ... scroll down the page so the Basic breadcrumb is at the top, and select an item - once clicked the page will reset to the top of the screen.
I assume this is something to do with the behaviour of the ''target' option - Is there any settings that can be changed to make sure that when the item in the breadcrumb is clicked, it only executes the code in the command method for that item, and doesn't treat it as any kind of hyperlink?
Thanks in advance!

Re: Breadcrumb component scrolls to top of screen

Posted: 20 Mar 2023, 10:44
by bahadirsofuoglu
Hi, Could you open an issue on Github? Thank you for your feedback