Opening a dialog window via a command from a menupopup leads to
unexpected glitches in the dialog's popups (e.g., collections menu
in newCollection dialog on macOS won't go away when you click away,
and on Windows, child collections don't appear when a parent is hovered).
This is due to some kind of race condition that arises when the dialog
appears when the popup is still closing.
This workaround captures command events from menupopups, closes the popup,
stops propagation of those events, and then dispatches a copy of
that event after a delay. This gives the popup enough time to close.
Fixes: #5408Fixes: #4891
This was a regression from the switch to `Zotero.HTTP.download()`. 302
wasn't a success code, so `HTTP.download()` would throw, and since the
status wasn't set correctly on the `XMLHttpRequest` within
`HTTP.UnexpectedStatusException`, it would think it was an interrupted
S3 connection and trigger another download after a delay.
* Add missing icon for "My Library" in the "Copy To" menu in cases where there are no other libraries in that menu
* Add icon to the "New Collection..." option in the item context menu
If the id of the collection happens to be the same
as an id of an existing item, those objects may end
up being used interchangeably in itemTree.
The trashed collection could appear in "My Library"
instead of the item, or the not-deleted item could appear
in the trash instead of the collection.
This is addressed by using .treeViewID instead of the
.id of the objects in ItemTree.refresh and ZoteroPane.itemSelected.
* Fixed an issue where the window size did not match the content
* Replaced the semi-transparent progress bar with a spinner
* Fixed a problem that allowed triggering a search while one was already in progress
* Reduced code complexity
This allows the locator dropdown to be as wide as it wants
(depending on the longest option in the current locale),
with inputs occupying the remaining space. This is
a more flexible layout that avoids broken UI in
cases if <select> dropdown tries to become too wide
while <input>s occupy a fixed space to remain aligned.
Fixes: #5350