Can't set name for new file / new folder when invoked inside a Dropbox directory
Prerequisites
- [x] I have searched open and closed issues for duplicates.
Describe the bug
When invoking new file/new folder on a directory inside Dropbox folder, the name for the new item is only editable while Dropbox isn't aware of the new file. As long as this happens (~1 second into editing, sometimes instantly), the name setting is cancelled and the new file or folder appears with the default name ("new file").
After this happens, the file/folder must be right-clicked->rename or the F2 action (rename) must be used, but F2 becomes irresponsive for the first seconds at least.
Also, it is particularly annoying that, when this happens and you are still typing the name, Files will interpret your typing as a search and will fire-up the search panel.
To Reproduce
Steps to reproduce the behavior:
- Go to any directory inside your Dropbox folder
- Right-click -> new file/new folder
- Try to write a new name for the new file, especially a large one that takes more than 2 seconds to write
- The name edit box will be closed and the edited changes lost. The new file will appear with the default name ('new file').
Expected behavior
The name edit box should be active until the user types 'Enter'.
Screenshots or screen recordings

Platform Information
- [ ] I'm using the latest version from git that I've manually compiled
- [x] I'm using the latest released stable version
@derkomai Thanks for the report! Are you using the pantheon-dropbox plugin or do you just have the dropbox client installed? (I am not sure whether the pantheon plugin is working - or used by anyone - at the moment)
@jeremypw I am using the plugin from https://github.com/zant95/elementary-dropbox
OK, thanks - that is not really a plugin (not a Files plugin anyway) - it seems to be a script that downloads the dropbox client and some packages to enable ayatana indicators (which may no longer work in wingpanel). So I suspect that the dropbox client is accessing or updating the new file while it is being renamed which is causing the rename process to abort. I think the only way around this is for Files to not actually create the new file until the name has been entered. This would require some significant changes so is not likely to happen soon. I can only suggest that, for the moment, you create the file outside the dropbox folder and do not drag it into the folder until it has the name and contents you want. You could also checkout the DropBox selective sync options - it may be possible to set it up so that it ignores files named "new file".
Omg I always found this annoying and was surprised more people don't report it. I never thought this would be Dropbox-specific - I guess I never create files/folders elsewhere :sweat_smile: :shrug:
PS: my current "workaround" is to just confirm the temp name with enter, then navigate to the file/folder again and rename with F2 - at this point it won't get interrupted. Not very smooth, but more straightforward than creating it elsewhere and moving after.
FWIW I now install Dropbox from flathub (OS 6 + OS 7). I just checked and I see no pantheon plugin for Dropbox in APT repos on OS 7 (just nautilus, caja, and thunar).
See https://github.com/elementary/files/wiki/dropbox
I didn't really use the plugin for several years. Most of the time I'm okay with the sync just working and doing its thing. If I need to share a file link (which is not very often) I can use the terminal (needs a patch in case of flatpak) or my phone app. At some point maybe the cloud providers standard will have dropbox support and this will all be moot :shrug: :smile: