diff --git a/js/ui/scheduler/appointmentPopup/popup.js b/js/ui/scheduler/appointmentPopup/popup.js index 7da083e5423d..ed93456ae823 100644 --- a/js/ui/scheduler/appointmentPopup/popup.js +++ b/js/ui/scheduler/appointmentPopup/popup.js @@ -243,7 +243,9 @@ export class AppointmentPopup { } triggerResize() { - this.popup && triggerResizeEvent(this.popup.$element()); + if(this.popup) { + triggerResizeEvent(this.popup.$element()); + } } _getMaxWidth(isRecurrence) { @@ -254,11 +256,15 @@ export class AppointmentPopup { } changeSize(isRecurrence) { - const fullScreen = this._isPopupFullScreenNeeded(); - this.popup.option({ - fullScreen, - maxWidth: fullScreen ? '100%' : this._getMaxWidth(isRecurrence), - }); + if(this.popup) { + const fullScreen = this._isPopupFullScreenNeeded(); + this.popup.option({ + fullScreen, + maxWidth: fullScreen + ? '100%' + : this._getMaxWidth(isRecurrence), + }); + } } updatePopupFullScreenMode() { diff --git a/testing/testcafe/tests/scheduler/appointmentForm/showAppointmentPopup.ts b/testing/testcafe/tests/scheduler/appointmentForm/showAppointmentPopup.ts index 3bd7e1cd3258..a6d0429f48b9 100644 --- a/testing/testcafe/tests/scheduler/appointmentForm/showAppointmentPopup.ts +++ b/testing/testcafe/tests/scheduler/appointmentForm/showAppointmentPopup.ts @@ -3,7 +3,7 @@ import Scheduler from '../../../model/scheduler'; import createWidget from '../../../helpers/createWidget'; import url from '../../../helpers/getPageUrl'; -fixture`Timeline Appointments` +fixture`Appointment Form` .page(url(__dirname, '../../container.html')); const showAppointmentPopup = ClientFunction(() => { @@ -28,3 +28,35 @@ test('Invoke showAppointmentPopup method shouldn\'t raise error if value of curr currentDate: new Date(2021, 2, 25).toISOString(), height: 600, }, true)); + +test('Show appointment popup if deffereRendering is false (T1069753)', async (t) => { + const scheduler = new Scheduler('#container'); + const appointment = scheduler.getAppointmentByIndex(0); + + await t + .doubleClick(appointment.element) + .expect(scheduler.appointmentPopup.isVisible) + .ok(); +}).before(async () => { + await ClientFunction(() => { + (window as any).DevExpress.ui.dxPopup.defaultOptions({ + options: { + deferRendering: false, + }, + }); + })(); + + await createWidget('dxScheduler', { + dataSource: [{ + text: 'Test', + startDate: new Date(2021, 2, 29, 10), + endDate: new Date(2021, 2, 29, 11), + }], + views: ['day'], + currentView: 'day', + currentDate: new Date(2021, 2, 29), + startDayHour: 9, + endDayHour: 12, + width: 400, + }, true); +});