Page scrolls to top on single action button click example #5248
-
Describe the bugPage scrolls to top on single action button click How to reproducehttps://stackblitz.com/edit/clarity-v3-dark-theme-timeline-demo-dg6zfs?file=package.json Steps to reproduce the behavior: https://www.screencast.com/t/kPLtJClMENGh VersionsApp
Device:
Additional notes Issue doesn't seem to be reproducible with the online demos. Bogdan Bogdanov: The issue seems to be caused by this line - https://github.com/vmware/clarity/blob/e28c89b74aad11aeb861ca5cd4a569d9953e8b96/packages/angular/projects/clr-angular/src/data/datagrid/datagrid-action-overflow.ts#L78 .When the button is clicked we search for the first button inside the document and we focus it. That’s why the scroll goes to the top, cause the first button in the document is the one in the first row |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Any luck with fixing this problem for the time being? |
Beta Was this translation helpful? Give feedback.
-
The issue here is that the example stackblitz is not using the standard Clarity application layout. I've updated the example to place application content in the https://stackblitz.com/edit/gh-5248-app-layout-v4?file=src/app/app.component.html I know it's not explicitly called out but application components need to be in the correct DOM hierarchy for some parts to work properly. One more thing, I'm moving this to a discussion since its not an issue, more of a |
Beta Was this translation helpful? Give feedback.
The issue here is that the example stackblitz is not using the standard Clarity application layout.
I've updated the example to place application content in the
.content-area
container as described in the application layout docs.https://stackblitz.com/edit/gh-5248-app-layout-v4?file=src/app/app.component.html
I know it's not explicitly called out but application components need to be in the correct DOM hierarchy for some parts to work properly.
One more thing, I'm moving this to a discussion since its not an issue, more of a
how to
that seems to fit better in a discussion for now.