Uploading multiple files in files section - incorrect sort value?

Today I spotted a difference in behavior while uploading multiple files in Kirby 3 vs Kirby 4.

I have a files section with manual sorting enabled. In Kirby 3, when I upload multiple files, a sort number is inserted in file’s content file. From 1 for the first file to whatever the number of files I uploaded.

However, when I try the same in Kirby 4 (4.1.2), all the files gets the same sort number (it seems like it is number of files + 1). After I manually rearrange some of them, those files sort number changes, but the other ramain untouched.

I guess this could be considered a bug?

Could you post your section definition, please?

For testing purposes I used clean plainkit. I added files section to site.yml:

title: Site

sections:
  pages:
    type: pages
  files:
    type: files
    label: "Testing files"

I uploaded three images at once. In Kirby 3.9.8 the sorting numbers are 1, 2 and 3 respectively. In Kirby 4.1.2, all images get the sorting number 4.

Yes, that looks like a bug. It somehow counts up for each individual upload, but not files per upload.

Should I create an issue on GitHub?

Yes, please!