From 196a2b401c4bead5ddc392958e2c97d503c3a959 Mon Sep 17 00:00:00 2001 From: Voyagerroc-Code <325343927+Voyagerroc-Code@users.noreply.github.com> Date: Mon, 14 Sep 2026 13:22:42 +0300 Subject: [PATCH] fix(chatroom): remove positive tabindex from composer input (fixes #270) --- apps/webapp/cypress/e2e/chatroom/send-and-retry.cy.ts | 6 +++--- .../components/MessageComposer/components/Input/Input.tsx | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/apps/webapp/cypress/e2e/chatroom/send-and-retry.cy.ts b/apps/webapp/cypress/e2e/chatroom/send-and-retry.cy.ts index 11ddd79d3..1927fa474 100644 --- a/apps/webapp/cypress/e2e/chatroom/send-and-retry.cy.ts +++ b/apps/webapp/cypress/e2e/chatroom/send-and-retry.cy.ts @@ -7,7 +7,7 @@ describe('chatroom send and retry', () => { }) it('sends a message and renders it', () => { - cy.get('[data-testid="composer-input"]').type('hello from cypress') + cy.get('[data-testid="composer-input"] [contenteditable="true"]').type('hello from cypress') cy.get('[data-testid="composer-primary-action"]').click() cy.contains('hello from cypress').should('be.visible') }) @@ -17,7 +17,7 @@ describe('chatroom send and retry', () => { statusCode: 401, body: { code: '42501' } }).as('failedSend') - cy.get('[data-testid="composer-input"]').type('this will fail') + cy.get('[data-testid="composer-input"] [contenteditable="true"]').type('this will fail') cy.get('[data-testid="composer-primary-action"]').click() cy.wait('@failedSend') cy.get('[data-status="failed"]').should('be.visible') @@ -29,7 +29,7 @@ describe('chatroom send and retry', () => { statusCode: 409, body: { code: '23505', message: 'duplicate key value violates unique constraint' } }).as('dupSend') - cy.get('[data-testid="composer-input"]').type('idempotent send') + cy.get('[data-testid="composer-input"] [contenteditable="true"]').type('idempotent send') cy.get('[data-testid="composer-primary-action"]').click() cy.wait('@dupSend') cy.get('[data-status="sent"]').should('exist') diff --git a/apps/webapp/src/components/chatroom/components/MessageComposer/components/Input/Input.tsx b/apps/webapp/src/components/chatroom/components/MessageComposer/components/Input/Input.tsx index 1e3642a58..8bb91bc80 100644 --- a/apps/webapp/src/components/chatroom/components/MessageComposer/components/Input/Input.tsx +++ b/apps/webapp/src/components/chatroom/components/MessageComposer/components/Input/Input.tsx @@ -23,12 +23,10 @@ export const Input = ({ className }: { className?: string }) => { 'text-base-content flex min-w-0 flex-1 items-center self-center', rowHeight, className - )} - tabIndex={1}> + )}>