Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/afraid-bats-argue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/fuselage': patch
---

fix(fuselage): autocomplete overlay on MultiSelectFiltered component
11 changes: 11 additions & 0 deletions packages/fuselage/src/components/MultiSelect/MultiSelect.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { composeStories } from '@storybook/react-webpack5';
import { screen } from '@testing-library/react';
import { axe } from 'jest-axe';
import { withResizeObserverMock } from 'testing-utils/mocks/withResizeObserverMock';

Expand Down Expand Up @@ -30,3 +31,13 @@ test.each(testCases)(
expect(results).toHaveNoViolations();
},
);

test('MultiSelectFiltered prevents Chrome autocomplete overlay (regression)', () => {
const { WithFilter } = composeStories(stories);

render(<WithFilter />);

const inputElement = screen.getByRole('combobox');

expect(inputElement).toHaveAttribute('autocomplete', 'off');
});
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const MultiSelectFilteredAnchor = forwardRef<
{...props}
rcx-input-box--undecorated
order={1}
autoComplete='off'
/>
</FlexItem>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ exports[`renders WithFilter without crashing 1`] = `
<input
aria-expanded="false"
aria-haspopup="listbox"
autocomplete="off"
class="rcx-box rcx-box--full rcx-box--animated rcx-input-box--undecorated rcx-input-box rcx-css-trljwa rcx-css-pqpp8q"
placeholder="Placeholder here..."
role="combobox"
Expand Down
Loading