File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1202,6 +1202,28 @@ describe('Appointment Form', () => {
12021202 expect ( POM . popup . isRecurrenceGroupVisible ( ) ) . toBe ( true ) ;
12031203 } ) ;
12041204
1205+ it ( 'should close repeat selectbox popup when navigating to recurrence group via settings button' , async ( ) => {
1206+ const { POM , scheduler } = await createScheduler ( {
1207+ ...getDefaultConfig ( ) ,
1208+ dataSource : [ { ...recurringAppointment } ] ,
1209+ } ) ;
1210+
1211+ const dataSource = ( scheduler as any ) . getDataSource ( ) ;
1212+ const appointment = dataSource . items ( ) [ 0 ] ;
1213+
1214+ scheduler . showAppointmentPopup ( appointment ) ;
1215+ POM . popup . editSeriesButton . click ( ) ;
1216+
1217+ const repeatEditor = POM . popup . dxForm . getEditor ( 'repeatEditor' ) ;
1218+ POM . popup . getInput ( 'repeatEditor' ) . click ( ) ;
1219+
1220+ expect ( repeatEditor ?. option ( 'opened' ) ) . toBe ( true ) ;
1221+
1222+ POM . popup . recurrenceSettingsButton . click ( ) ;
1223+
1224+ expect ( repeatEditor ?. option ( 'opened' ) ) . toBe ( false ) ;
1225+ } ) ;
1226+
12051227 it ( 'should have disabled week day buttons when allowUpdating is false' , async ( ) => {
12061228 const { POM , scheduler } = await createScheduler ( {
12071229 ...getDefaultConfig ( ) ,
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import type { Properties as SwitchProperties } from '@js/ui/switch';
1717import type { Properties as TextAreaProperties } from '@js/ui/text_area' ;
1818import { current , isFluent } from '@js/ui/themes' ;
1919import { dateSerialization } from '@ts/core/utils/m_date_serialization' ;
20+ import DropDownEditor from '@ts/ui/drop_down_editor/m_drop_down_editor' ;
2021import type Popup from '@ts/ui/popup/m_popup' ;
2122
2223import timeZoneUtils from '../m_utils_time_zone' ;
@@ -920,6 +921,11 @@ export class AppointmentForm {
920921 }
921922
922923 showRecurrenceGroup ( ) : void {
924+ const repeatEditor = this . dxForm . getEditor ( REPEAT_EDITOR_NAME ) ;
925+ if ( repeatEditor instanceof DropDownEditor ) {
926+ repeatEditor . close ( ) ;
927+ }
928+
923929 this . _popup . updateToolbarForRecurrenceGroup ( ) ;
924930
925931 const currentHeight = this . dxPopup . option ( 'height' ) as string | number | undefined ;
You can’t perform that action at this time.
0 commit comments