Skip to content

Commit 8301b8b

Browse files
committed
fix(aria/combobox): do not open on click
1 parent 4aad878 commit 8301b8b

File tree

3 files changed

+0
-21
lines changed

3 files changed

+0
-21
lines changed

src/aria/combobox/combobox.spec.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,6 @@ describe('Combobox', () => {
211211
describe('Expansion', () => {
212212
beforeEach(() => setupCombobox());
213213

214-
it('should open on click', () => {
215-
focus();
216-
click(inputElement);
217-
expect(inputElement.getAttribute('aria-expanded')).toBe('true');
218-
});
219-
220214
it('should open on ArrowDown', () => {
221215
focus();
222216
keydown('ArrowDown');
@@ -956,12 +950,6 @@ describe('Combobox', () => {
956950
describe('Expansion', () => {
957951
beforeEach(() => setupCombobox());
958952

959-
it('should open on click', () => {
960-
focus();
961-
click(inputElement);
962-
expect(inputElement.getAttribute('aria-expanded')).toBe('true');
963-
});
964-
965953
it('should open on ArrowDown', () => {
966954
focus();
967955
keydown('ArrowDown');

src/aria/private/combobox/combobox.spec.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -295,13 +295,6 @@ describe('Combobox with Listbox Pattern', () => {
295295
});
296296

297297
describe('Expansion', () => {
298-
it('should open on click', () => {
299-
const {combobox, inputEl} = getPatterns();
300-
expect(combobox.expanded()).toBe(false);
301-
combobox.onPointerup(clickInput(inputEl));
302-
expect(combobox.expanded()).toBe(true);
303-
});
304-
305298
it('should open on ArrowDown', () => {
306299
const {combobox} = getPatterns();
307300
expect(combobox.expanded()).toBe(false);

src/aria/private/combobox/combobox.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,6 @@ export class ComboboxPattern<T extends ListItem<V>, V> {
210210
if (e.target === this.inputs.inputEl()) {
211211
if (this.readonly()) {
212212
this.expanded() ? this.close() : this.open({selected: true});
213-
} else {
214-
this.open();
215213
}
216214
}
217215
}),

0 commit comments

Comments
 (0)