Skip to content

'Styled badge' demo keeps pushing the scroll to the bottom in v25 #51

Closed

Description

@Totremont

Describe the bug

Navigate to the styled badge in the vaadin 25 demo and the view will automatically push the scroll to the bottom and it will not let you go back up.
This does not happen in the v24 demo.

Expected behavior

The demo view should not make the scroll stick to the bottom

Minimal reproducible example

Navigate to the styled badge demo in Vaadin 25

Tested with Firefox, Safari and Chrome.

Add-on Version

1.2.1-SNAPSHOT

Vaadin Version

25

Additional information

No response

Activity

  1. added theissue type on Jul 6, 2026
  2. javier-godoy commented on Jul 13, 2026

    @javier-godoy
    Contributor

    Confirmed

  3. moved this from Inbox (needs triage) to To Do in Flowing Code Addonson Jul 13, 2026
  4. paodb commented on Oct 16, 2026

    @paodb
    Member

    The issue is not in BadgeList nor in Commons Demo, but in AddonsDemo25. It can be reproduced in both staging and production, both running BadgeList 2.1.1-SNAPSHOT on Vaadin 25.3.0.

    Root cause

    In AddonsDemo25, addons-info.json still lists BadgeList with "auraSupported": false. Because of that, DemoLayout doesn't place the TabbedDemo directly in the AppLayout, but inside the wrapper Div created by createUnsupportedThemeWrapper. That wrapper has no height, so the height: 100% of the TabbedDemo (and its split layout) can't be resolved and the layout grows to the full height of the source code. The code viewer then doesn't scroll on its own and the whole app-layout content becomes scrollable.

    When hovering an example, the code viewer highlights the matching block with scrollIntoView, which now scrolls the whole page down to the code. Scrolling back up with the wheel puts the mouse over an example again, so the page jumps down again. That's why the scroll looks stuck at the bottom. The v24 demo doesn't wrap the content, which is why it doesn't happen there.

    How to fix it

    BadgeList already supports Aura (see #54), but AddonsDemo25 was never updated to reflect that. Setting "auraSupported": true for BadgeList in AddonsDemo25 addons-info.json removes the wrapper and fixes this issue (verified by giving the wrapper a full height in the browser: the page no longer scrolls on hover).

    Separately, the wrapper in createUnsupportedThemeWrapper should also get a full size (setSizeFull()), otherwise the same problem will affect any Lumo-only add-on that uses TabbedDemo with source highlighting.

  5. removed theissue type on Oct 16, 2026
  6. removed
    bugSomething isn't working
    on Oct 16, 2026
  7. self-assigned this
    on Oct 16, 2026
  8. paodb commented on Oct 19, 2026

    @paodb
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions