Skip to content

fix: navigate on content click when side-nav item path is empty (#13264) (CP: 25.3) - #13267

Merged
web-padawan merged 1 commit into
25.3from
cherry-pick-13264-to-25.3-1793008650313
Oct 26, 2026
Merged

web-padawan merged 1 commit into
25.3from
cherry-pick-13264-to-25.3-1793008650313

Conversation

@vaadin-bot

Copy link
Copy Markdown
Collaborator

This PR cherry-picks changes from the original PR #13264 to branch 25.3.


Description

Fixes #13241

path="" is a valid path: the link gets href="", which points to the current document or the <base href>, for example the root route of an app. The content click handler used a truthy check on path, so an empty string did not count as a set path. The toggle branch only runs when path == null, so a click on the padding of the item did nothing.

  • Changed the content click handler of vaadin-side-nav-item to click the link when path is any value other than null or undefined, including an empty string
  • Added tests for a content click with a non empty path, an empty path and no path

Type of change

  • Bugfix

@sonarqubecloud

Copy link
Copy Markdown

@vaadin-bot

Copy link
Copy Markdown
Collaborator Author

This PR is eligible for auto-merging policy, so it has been approved automatically. If there are pending conditions, auto merge (with 'squash' method) has been enabled for this PR [Message is sent from bot]

@vaadin-bot
vaadin-bot enabled auto-merge (squash) October 26, 2026 10:47
@web-padawan
web-padawan disabled auto-merge October 26, 2026 12:44
@web-padawan
web-padawan merged commit a9d93e1 into 25.3 Oct 26, 2026
13 checks passed
@web-padawan
web-padawan deleted the cherry-pick-13264-to-25.3-1793008650313 branch October 26, 2026 12:44
@vaadin-bot

Copy link
Copy Markdown
Collaborator Author

This ticket/PR has been released with Vaadin 25.3.5.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants