Skip to content

Commit

Permalink
Set cursor position after all files are uploaded
Browse files Browse the repository at this point in the history
  • Loading branch information
kiss-keray committed Sep 25, 2024
1 parent f6fe67a commit e8ee20b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/quill/src/modules/uploader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ class Uploader extends Module<UploaderOptions> {
coverFile,
);
handlerFlag[index] = nodeLength;
const uploadsFinish = handlerFlag.every((f) => f > 0);
if (uploadsFinish) {
this.quill.setSelection(
range.index + handlerFlag.reduce((v, s) => v + s),
Emitter.sources.SILENT,
);
}
});
}
return;
Expand Down

0 comments on commit e8ee20b

Please sign in to comment.