Closed RealRaven2000 closed 11 months ago
Apparently the source code of my function addDragToNewFolderItem() used to clone material from the Thunderbird folder pane context menu - but this is not available to QuickFolders any more:
// New Folder... submenu items
let folderPaneContext = document.getElementById("folderPaneContext");
if (folderPaneContext) {
let newMenuItem = document.getElementById("QF_folderPaneContext-new");
if (newMenuItem) {
let createFolderMenuItem=newMenuItem.cloneNode(true);
if (folder.hasSubFolders) {
let sep = this.createIconicElement("menuseparator","*", popupMenu.ownerDocument);
popupMenu.appendChild(sep);
}
createFolderMenuItem.id=""; // delete existing menu
createFolderMenuItem.id="QF_folderPaneContext-new"; // for styling!
createFolderMenuItem.folder=folder;
createFolderMenuItem.setAttribute("class","menuitem-iconic");
// use parent folder URI as each starting point
this.setEventAttribute(createFolderMenuItem, "ondragenter","QuickFolders.popupDragObserver.dragEnter(event);");
this.setEventAttribute(createFolderMenuItem, "ondrop","QuickFolders.popupDragObserver.drop(event);"); // only case where we use the dedicated observer of the popup!
// [Bug 26425] option to put 'create new subfolder' on top
if (prefs.getBoolPref("dragToCreateFolder.menutop"))
popupMenu.insertBefore(createFolderMenuItem, popupMenu.firstChild);
else
popupMenu.appendChild(createFolderMenuItem);
}
}
So we need to create this menu item from scratch rather than cloning it from Thunderbird...
Fixed version below:
this will only copy the label and accelerator key from the folderpane popup, everything else is generated from scratch.
To test the new version above, download the zip file, drag the file into Thunderbird Add-ons Manager, do not extract contents or if won't install.
Fixed in 6.3 - Published 30/10/2023
When dragging email to a QuickFolders tab, we are missing the command "new subfolder...". This menu should be there on dropping mail if the setting is activated in QuickFolders Advanced settings / Mail Commands:
This is expected to append "New Subfolder..." to the bottom of the dropdown menu when an email is dragged onto a Tab. This is now always missing.