diff --git a/src/webviews/apps/plus/focus/components/pull-request-row.ts b/src/webviews/apps/plus/focus/components/pull-request-row.ts index c2c9fd0..aac3c88 100644 --- a/src/webviews/apps/plus/focus/components/pull-request-row.ts +++ b/src/webviews/apps/plus/focus/components/pull-request-row.ts @@ -103,15 +103,15 @@ const template = html` @@ -213,7 +213,6 @@ const styles = css` .actions a[tabindex='-1'] { opacity: 0.5; cursor: default; - pointer-events: none; } .actions a code-icon { @@ -358,11 +357,21 @@ export class PullRequestRow extends FASTElement { return assignees; } - onOpenWorktreeClick(_e: Event) { + onOpenWorktreeClick(e: Event) { + if (this.iscurrentWorktree) { + e.preventDefault(); + e.stopImmediatePropagation(); + return; + } this.$emit('open-worktree', this.pullRequest!); } - onSwitchBranchClick(_e: Event) { + onSwitchBranchClick(e: Event) { + if (this.isCurrentBranch) { + e.preventDefault(); + e.stopImmediatePropagation(); + return; + } this.$emit('switch-branch', this.pullRequest!); } }