Fix new collection dialog appearing broken when
opened via "New Collection" option of context menu
on "My Library" or a group in collection tree.
On macOS, the popup of collections would never leave
and on windows, subcollection would never appear.
This is a followup to zotero#5409
that fixes this issue for all collections. The reason
why it didn't work for groups is that the command event
would fire not on a menuitem but on the <command> node itself,
which is not what the workaround expects.
Now, if we get such an event, we'll try to use the
original 'command' event dispatched on the <menuitem>
from event.sourceEvent to locate the <menupopup>
and as a blueprint for redispatching the event.
Fix createParentDialog hanging when opened during
quicksearch or in saved search. After a parent item
is added, itemTree is being refreshed. If _refreshPromise
is resolved after a timeout, it will not complete until the
modal dialog is closed. Instead, resolve _refreshPromise
after Zotero.Promise.delay, which uses the XPCOM global
timer unaffected by modals.
Fixes: #3026
Another potential fix to the test failure. Earlier fix
from 30784dd241 seems
to not have worked.
A new explanation is that the test before it does not properly
wait for the trash to refresh before trying to select the library, in
which case collectionTree select event will be suppressed
and library selection will not happen.
Fixes: #5584
This test would sometimes fail, most likely due to
the library sometimes not getting re-selected in the previous test
'should update custom header for items in the trash'.
A likely explanation is that the selection event in
collectionTree would still be suppressed when selectLibrary
is called, so make sure to wait for item deletion to
go through before trying to re-select the library.
Fixes: #5584
If the tag selector is not initialized in setScope,
initialize it before proceeding. This fixes
the tag selector being stuck in loading state
after expanding.
Fixes: #5573
- Remember diffs from test runs, show in sidebar when test is selected
- Add button to immediately update test, without a prompt
- Indicate when test has a custom defer delay set (although no tests currently do)
- Use a persistent test store as source of truth, instead of data attributes on the listbox rows
- A bit of code cleanup
Closes#5420, closes#5419
QuickCopy.init() calls Style#getCiteProc(), and a side effect of
citeproc-js locale initialization could cause a recursive call back to
QuickCopy.init(), which would again call Style#getCiteProc() (after it
had checked its cache but before it had added the new engine to it),
leading to duplicate CSL.Engine initialization. Now we correctly check
whether we've already been initialized, eliminating the race condition.
Separately, remove async keyword from init(). It never actually was
async - even before Bluebird removal, it didn't await anything or return
a promise. And we can't make it await its pre-caching work because
schemaUpdatePromise won't resolve until init() resolves/returns.
* Fixed incorrect new name generation for attachments without a file extension and not present on disk
* Fixed invalid preview in certain edge cases
* Added tests covering file renaming in general and the above issues
When an embedded attachment note is converted to
a standalone note, relate the standalone note to
the attachment and place it in the same collections
as the attachment.