File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1323,6 +1323,28 @@ describe('Appointment Form', () => {
13231323 expect ( POM . popup . isRecurrenceGroupVisible ( ) ) . toBe ( true ) ;
13241324 } ) ;
13251325
1326+ it ( 'should close repeat selectbox popup when navigating to recurrence group via settings button' , async ( ) => {
1327+ const { POM , scheduler } = await createScheduler ( {
1328+ ...getDefaultConfig ( ) ,
1329+ dataSource : [ { ...recurringAppointment } ] ,
1330+ } ) ;
1331+
1332+ const dataSource = ( scheduler as any ) . getDataSource ( ) ;
1333+ const appointment = dataSource . items ( ) [ 0 ] ;
1334+
1335+ scheduler . showAppointmentPopup ( appointment ) ;
1336+ POM . popup . editSeriesButton . click ( ) ;
1337+
1338+ const repeatEditor = POM . popup . dxForm . getEditor ( 'repeatEditor' ) ;
1339+ POM . popup . getInput ( 'repeatEditor' ) . click ( ) ;
1340+
1341+ expect ( repeatEditor ?. option ( 'opened' ) ) . toBe ( true ) ;
1342+
1343+ POM . popup . recurrenceSettingsButton . click ( ) ;
1344+
1345+ expect ( repeatEditor ?. option ( 'opened' ) ) . toBe ( false ) ;
1346+ } ) ;
1347+
13261348 it ( 'should have disabled week day buttons when allowUpdating is false' , async ( ) => {
13271349 const { POM , scheduler } = await createScheduler ( {
13281350 ...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' ;
@@ -917,6 +918,11 @@ export class AppointmentForm {
917918 }
918919
919920 showRecurrenceGroup ( ) : void {
921+ const repeatEditor = this . dxForm . getEditor ( REPEAT_EDITOR_NAME ) ;
922+ if ( repeatEditor instanceof DropDownEditor ) {
923+ repeatEditor . close ( ) ;
924+ }
925+
920926 this . _popup . updateToolbarForRecurrenceGroup ( ) ;
921927
922928 const currentHeight = this . dxPopup . option ( 'height' ) as string | number | undefined ;
You can’t perform that action at this time.
0 commit comments