From 16bc64e2fae39a8550539acb7c2cb707e188e72e Mon Sep 17 00:00:00 2001 From: Vipin Chaudhary Date: Mon, 10 Feb 2025 12:55:21 +0530 Subject: [PATCH] fix: Remove AI Assistant Button from Tab Order to Prevent Focus (#6569) * make ai button unfocused * fix the format --- packages/constants/src/tab-indices.ts | 1 - web/core/components/core/modals/gpt-assistant-popover.tsx | 2 +- .../issues/issue-modal/components/description-editor.tsx | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/constants/src/tab-indices.ts b/packages/constants/src/tab-indices.ts index 0668528893..0382b67f3f 100644 --- a/packages/constants/src/tab-indices.ts +++ b/packages/constants/src/tab-indices.ts @@ -2,7 +2,6 @@ export const ISSUE_FORM_TAB_INDICES = [ "name", "description_html", "feeling_lucky", - "ai_assistant", "state_id", "priority", "assignee_ids", diff --git a/web/core/components/core/modals/gpt-assistant-popover.tsx b/web/core/components/core/modals/gpt-assistant-popover.tsx index 0056977ed6..747723c29d 100644 --- a/web/core/components/core/modals/gpt-assistant-popover.tsx +++ b/web/core/components/core/modals/gpt-assistant-popover.tsx @@ -188,7 +188,7 @@ export const GptAssistantPopover: React.FC = (props) => { return ( - diff --git a/web/core/components/issues/issue-modal/components/description-editor.tsx b/web/core/components/issues/issue-modal/components/description-editor.tsx index 963779c7d0..8e5d51f788 100644 --- a/web/core/components/issues/issue-modal/components/description-editor.tsx +++ b/web/core/components/issues/issue-modal/components/description-editor.tsx @@ -262,7 +262,7 @@ export const IssueDescriptionEditor: React.FC = ob type="button" className="flex items-center gap-1 rounded px-1.5 py-1 text-xs bg-custom-background-90 hover:bg-custom-background-80" onClick={() => setGptAssistantModal((prevData) => !prevData)} - tabIndex={getIndex("ai_assistant")} + tabIndex={-1} > AI