From a0bd72ea0748bf519fa9305f6b9b2c1f5c28bdab Mon Sep 17 00:00:00 2001 From: Roman Semenov Date: Tue, 3 Dec 2024 02:33:29 +0400 Subject: [PATCH] fix: kbn inside of collector --- .../scheduler/appointments/m_appointment_collection.ts | 4 ++++ packages/devextreme/js/__internal/scheduler/m_scheduler.ts | 2 -- .../tooltip_strategies/m_desktop_tooltip_strategy.ts | 1 + .../scheduler/tooltip_strategies/m_tooltip_strategy_base.ts | 4 ++++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/devextreme/js/__internal/scheduler/appointments/m_appointment_collection.ts b/packages/devextreme/js/__internal/scheduler/appointments/m_appointment_collection.ts index e93f891be91f..cfb444240ae6 100644 --- a/packages/devextreme/js/__internal/scheduler/appointments/m_appointment_collection.ts +++ b/packages/devextreme/js/__internal/scheduler/appointments/m_appointment_collection.ts @@ -465,6 +465,10 @@ class SchedulerAppointments extends CollectionWidget { const $target = $(e.currentTarget); const data = (this as any)._getItemData($target); + if ($target.is('.dx-scheduler-appointment-collector')) { + return; + } + if (e.type === 'keydown' || isFakeClickEvent(e)) { this.notifyObserver('showEditAppointmentPopup', { data, target: $target }); return; diff --git a/packages/devextreme/js/__internal/scheduler/m_scheduler.ts b/packages/devextreme/js/__internal/scheduler/m_scheduler.ts index 6e02a87edf87..c1dc19b1cb4c 100644 --- a/packages/devextreme/js/__internal/scheduler/m_scheduler.ts +++ b/packages/devextreme/js/__internal/scheduler/m_scheduler.ts @@ -1719,9 +1719,7 @@ class Scheduler extends Widget { startDayHour: this.option('startDayHour'), endDayHour: this.option('endDayHour'), viewOffset: this.getViewOffsetMs(), - tabIndex: this.option('tabIndex'), accessKey: this.option('accessKey'), - focusStateEnabled: this.option('focusStateEnabled'), cellDuration: this.option('cellDuration'), showAllDayPanel: this.option('showAllDayPanel'), showCurrentTimeIndicator: this.option('showCurrentTimeIndicator'), diff --git a/packages/devextreme/js/__internal/scheduler/tooltip_strategies/m_desktop_tooltip_strategy.ts b/packages/devextreme/js/__internal/scheduler/tooltip_strategies/m_desktop_tooltip_strategy.ts index 2b37d4249bba..dd76d688ee66 100644 --- a/packages/devextreme/js/__internal/scheduler/tooltip_strategies/m_desktop_tooltip_strategy.ts +++ b/packages/devextreme/js/__internal/scheduler/tooltip_strategies/m_desktop_tooltip_strategy.ts @@ -49,6 +49,7 @@ export class DesktopTooltipStrategy extends TooltipStrategyBase { onShown: this._onShown.bind(this), contentTemplate: this._getContentTemplate(dataList), wrapperAttr: { class: APPOINTMENT_TOOLTIP_WRAPPER_CLASS }, + _loopFocus: true, }); } diff --git a/packages/devextreme/js/__internal/scheduler/tooltip_strategies/m_tooltip_strategy_base.ts b/packages/devextreme/js/__internal/scheduler/tooltip_strategies/m_tooltip_strategy_base.ts index 6810f9280d46..807faaf7c1a1 100644 --- a/packages/devextreme/js/__internal/scheduler/tooltip_strategies/m_tooltip_strategy_base.ts +++ b/packages/devextreme/js/__internal/scheduler/tooltip_strategies/m_tooltip_strategy_base.ts @@ -65,6 +65,10 @@ export class TooltipStrategyBase { const listElement = $('
'); $(container).append(listElement); this._list = this._createList(listElement, dataList); + this._list.registerKeyHandler('escape', () => { + this.hide(); + this._tooltip.option('target').focus(); + }); }; }