@@ -37,7 +37,11 @@ export class MinimalQuickCaptureModal extends BaseQuickCaptureModal {
3737 private targetFileEl : HTMLDivElement | null = null ;
3838 private editorContainer : HTMLElement | null = null ;
3939
40- constructor ( app : App , plugin : TaskProgressBarPlugin , metadata ?: TaskMetadata ) {
40+ constructor (
41+ app : App ,
42+ plugin : TaskProgressBarPlugin ,
43+ metadata ?: TaskMetadata ,
44+ ) {
4145 // Default to checkbox mode for task creation
4246 super ( app , plugin , "checkbox" , metadata ) ;
4347
@@ -228,6 +232,10 @@ export class MinimalQuickCaptureModal extends BaseQuickCaptureModal {
228232 } ,
229233 } ) ;
230234
235+ // Initialize customFileName with resolved path so file-mode saves work
236+ // even when user doesn't edit the input
237+ this . taskMetadata . customFileName = resolvedPath ;
238+
231239 // Update the customFileName when input changes
232240 this . fileNameInput . addEventListener ( "input" , ( ) => {
233241 if ( this . fileNameInput ) {
@@ -660,9 +668,11 @@ export class MinimalQuickCaptureModal extends BaseQuickCaptureModal {
660668
661669 // Add tags (ensure they start with # but don't double-add)
662670 if ( this . taskMetadata . tags && this . taskMetadata . tags . length > 0 ) {
663- metadata . push ( ...this . taskMetadata . tags . map ( ( tag ) =>
664- tag . startsWith ( "#" ) ? tag : `#${ tag } `
665- ) ) ;
671+ metadata . push (
672+ ...this . taskMetadata . tags . map ( ( tag ) =>
673+ tag . startsWith ( "#" ) ? tag : `#${ tag } ` ,
674+ ) ,
675+ ) ;
666676 }
667677
668678 // Add metadata to content
0 commit comments