Bug #89527
closedCannot cut/copy files after clearing the clipboard in the file module
0%
Description
Steps to reproduce the problem¶
1. Go to the file module
2. Make sure that clipboard is enabled
3. Copy a file
3. See the file in the clipboard
4. Clear the clipboard by using the icon on the right of the clipboard header area
5. Copy the file again
6. Clipboard stays empty
Explanation¶
1. When the file is copied to the clipboard, it happens via ajax call.
2. To display the current clipboard state after copying, file module reloads itself. It uses the current frame url. This is a very important fact.
3. When the button to clear the clipboard is clicked, it happens by the reloading the page with &SET[clipBoard]=1&CB[removeAll]=normal
appended to the URL.
4. Next copying will add elements to the clipboard using ajax and reload the page using the current url. Since the url got the above shown parameters before, it will clear the clipboard immediately.
5. Any further adding to the clipboard will always immediately clear it.
The way to get out of this situation is to reload the whole backend. Then it will work until the clipboard is cleared again.
Reproducible for v8/v9. Similar code with the bug exists in the master branch.