Editor moves files in tree if has template

I think this is a new buy noticed moving from 11.x to 12.x and is present in latest 12.4.3.

We have a Dockerfile in various subdirs in the repo, and today when editing one in the Gitlab UI, when I save/commit it, I was astonished to find it had been moved to the root of the repo!

Turns out the editor does this only for the Dockerfile, not other files, it seems because the top of the editor changes as it recognizes that a Dockerfile template might be useful, so it has a drop down for that and other files; a bit weird.

To reproduce:

  1. Have Dockerfile in subdir of repo
  2. Nagivate to view the file contents
  3. Click edit
  4. Make change in editor (note top of page no longe shows subdir path, instead shows template name)
  5. Click Commit Change at bottom
  6. See the file has moved to the root of repo

Note we don’t use templates.