Skip to content

Commit

Permalink
fix: unexpected overlay opening
Browse files Browse the repository at this point in the history
  • Loading branch information
maxevilmind committed Sep 27, 2024
1 parent b25478e commit d2f9e21
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/ui/components/combobox/src/LionCombobox.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import { LionListbox } from '@lion/ui/listbox.js';
import { LocalizeMixin } from '@lion/ui/localize-no-side-effects.js';
import { OverlayMixin, withDropdownConfig } from '@lion/ui/overlays.js';
import { css, html } from 'lit';
import { CustomChoiceGroupMixin } from '../../form-core/src/choice-group/CustomChoiceGroupMixin.js';
import { makeMatchingTextBold, unmakeMatchingTextBold } from './utils/makeMatchingTextBold.js';
import { MatchesOption } from './validators.js';
import { CustomChoiceGroupMixin } from '../../form-core/src/choice-group/CustomChoiceGroupMixin.js';

const matchA11ySpanReverseFns = new WeakMap();

Expand Down Expand Up @@ -705,7 +705,11 @@ export class LionCombobox extends LocalizeMixin(OverlayMixin(CustomChoiceGroupMi
// eslint-disable-next-line no-unused-vars
_textboxOnInput(ev) {
this.__shouldAutocompleteNextUpdate = true;
this.opened = true;
const lastKey = ev && ev.key;
this.opened = this._showOverlayCondition({
lastKey,
currentValue: this._inputNode.value,
});
}

/**
Expand Down

0 comments on commit d2f9e21

Please sign in to comment.