Skip to content

Commit

Permalink
refactor(lookup)
Browse files Browse the repository at this point in the history
  • Loading branch information
marker dao ® committed Oct 9, 2024
1 parent 8bc4fd5 commit fbceb05
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions packages/devextreme/js/__internal/ui/m_lookup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -549,10 +549,9 @@ const Lookup = DropDownList.inherit({
_scrollToSelectedItemEnabled,
} = this.option();

const shouldInputBeIncludedInFocusOrder = (usePopover && !_scrollToSelectedItemEnabled)
|| !dropDownCentered;
const isInputFocusable = (usePopover && !_scrollToSelectedItemEnabled) || !dropDownCentered;

if (shouldInputBeIncludedInFocusOrder) {
if (isInputFocusable) {
this.callBase(e);
}
},
Expand Down Expand Up @@ -637,9 +636,9 @@ const Lookup = DropDownList.inherit({
_scrollToSelectedItemEnabled,
} = this.option();

const shouldLoopFocusInsidePopup = (!usePopover && !_scrollToSelectedItemEnabled)
|| (_scrollToSelectedItemEnabled && dropDownCentered);
// || dropDownCentered;
const shouldLoopFocusInsidePopup = _scrollToSelectedItemEnabled
? dropDownCentered
: !usePopover;

const result = extend(this.callBase(), {
toolbarItems: this._getPopupToolbarItems(),
Expand Down

0 comments on commit fbceb05

Please sign in to comment.