Drag and drop to rearrange containers is not working on Linux, KDE
Before submitting a bug report
- [X] I updated to the latest version of Multi-Account Container and tested if I can reproduce the issue
- [X] I searched for existing reports to see if it hasn't already been reported
Step to reproduce
- Click on Containers icon.
- Click on Manage Containers.
- Try to drag any container to rearrange the order. It fails.
I have seen this issue on Arch Linux, with KDE.
Actual behavior
Clicking and dragging does not drag the container. Instead a blue border appears around the container, but it stays in place as the mouse cursor moves.
Expected behavior
Clicking and dragging should move the container and allow reordering the containers.
Additional informations
Also reported by at least one other person, here.
Provide a copy of Troubleshooting Information page (optional)
No response
As this has not yet been solved, here is my workaround. This involves editing the container-order variable (which should have been created if this worked) manually.
- about:debugging -> Firefox -> this extension -> Inspect
- Storage -> Extension Storage -> moz-extension...
- Look for
container-orderas a key. If it does not exist, create it.- It should look something like
{"firefox-container-1":0,"firefox-container-2":1,"firefox-container-3":2,"firefox-container-4":3,"firefox-container-6":4,"firefox-container-7":5}. You can find the keys as storage key suffixes with the prefix "identitiesState@@_firefox-container-7". - Or you can automatically create it with the following -
- First disable ... -> Popup Auto Hide (so you can inspect the containers box).
- Open "Manage Containers", and inspect it.
- Run on console,
await Logic.saveContainerOrder(document.querySelector("#picker-identities-list")) - Re-enable ... -> Popup Auto Hide
- It should look something like
- The
'container-order' is basically{containerId: index, ...}. Alter the indices to suit your needs. Changes should be reflected immediately as you open the popup, and there should be no need to restart Firefox.
By the way, the drag and drop code appears to be located here, https://github.com/mozilla/multi-account-containers/blob/main/src/js/popup.js#L1229
Very likely something is wrong with that code.
As this has not yet been solved, here is my workaround. This involves editing the
container-ordervariable (which should have been created if this worked) manually.* about:debugging -> Firefox -> this extension -> Inspect * Storage -> Extension Storage -> moz-extension... * Look for `container-order` as a key. If it does not exist, create it. * It should look something like `{"firefox-container-1":0,"firefox-container-2":1,"firefox-container-3":2,"firefox-container-4":3,"firefox-container-6":4,"firefox-container-7":5}`. You can find the keys as storage key suffixes with the prefix "identitiesState@@_firefox-container-7". * Or you can automatically create it with the following - * First disable ... -> Popup Auto Hide (so you can inspect the containers box). * Open "Manage Containers", and inspect it. * Run on console, `await Logic.saveContainerOrder(document.querySelector("#picker-identities-list"))` * Re-enable ... -> Popup Auto Hide * The `'container-order`' is basically `{containerId: index, ...}`. Alter the indices to suit your needs. Changes should be reflected immediately as you open the popup, and there should be no need to restart Firefox.
@hirak99 Thanks for the workaround! The only change needed here is to replace await Logic.saveContainerOrder(document.querySelector("#picker-identities-list")) with await Logic.saveContainerOrder([...document.querySelector("#picker-identities-list").children]) since the arg is expected to be an array.
Since this issue is specific to Wayland, perhaps an easier work-around is to relaunch Firefox with MOZ_ENABLE_WAYLAND=0 firefox, fix the ordering, and then relaunch it again normally.