Skip to content

fix: allow Ctrl/Cmd+Click to open sidebar links in new tab#514

Merged
NagariaHussain merged 1 commit intofrappe:developfrom
gajjug004:fix/sidebar-tab-cmd-click
Feb 10, 2026
Merged

fix: allow Ctrl/Cmd+Click to open sidebar links in new tab#514
NagariaHussain merged 1 commit intofrappe:developfrom
gajjug004:fix/sidebar-tab-cmd-click

Conversation

@gajjug004
Copy link
Collaborator

@gajjug004 gajjug004 commented Feb 10, 2026

Problem

Sidebar navigation links were not respecting browser modifier keys. When users tried to open links in new tabs using Ctrl+Click (Windows/Linux) or Cmd+Click (Mac), which was not working, breaking expected browser behavior.

Root Cause

The @click.prevent directive was unconditionally preventing all default link behaviors, including modifier key combinations.

Solution

  • Replaced @click.prevent method with @click.prevent.exact`

Changes

  • sidebar_tree.html: Replaced @click.prevent with @click.prevent.exact and method call

@gajjug004 gajjug004 marked this pull request as ready for review February 10, 2026 12:03
@coderabbitai
Copy link

coderabbitai bot commented Feb 10, 2026

Walkthrough

The change modifies an Alpine.js event modifier in the sidebar tree template from @click.prevent to @click.prevent.exact on a page/leaf item anchor element. This represents a single-line modification to the click event binding syntax in the navigation component.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: allowing Ctrl/Cmd+Click to open sidebar links in new tabs, which directly addresses the root cause of the issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


No actionable comments were generated in the recent review. 🎉


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gajjug004 gajjug004 force-pushed the fix/sidebar-tab-cmd-click branch from 1a00e8c to edebd72 Compare February 10, 2026 12:16
@NagariaHussain NagariaHussain merged commit 183a73b into frappe:develop Feb 10, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants