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.
When drag-dropping items into a collection in another library,
perform the addition to collection in the same transaction
as creating a new item in the target library.
When the librariesCollectionsBox refreshes on the `modify` event
when a newly created group item is linked to the selected item,
it re-loads the data of the linked item via item.loadAllData().
This could happen after the item is added to the collection
but before this change is saved. In that case, item._changed.collections
would be cleared, and when the item is saved, there would be
no changes to collections to save.
Fixes: #5539
Also, cleanup leftover unused logic of restoring linked item
from trash on drop that was removed in 2dd16b44d6
When a tab is closed via clicks on "X" button, record
and lock all tabs' widths. That way, the "X" button
of the tab that follows the one that was just deleted
will land under the mouse cursor, allowing one to
delete many tabs. In addition, preserve the scroll position
of the tab bar. If it's impossible because too many tabs
were deleted, add a spacer after the last tab.
Fixes: #5523
Post-fx140, menulist labels in chrome windows are not
announced by VoiceOver. Setting the menulist's role to 'combobox'
addresses this and gets VoiceOver to announce the labels again.
This is interesting because 'combobox' is supposedly
menulist's implicit role, so it's not clear why this helps.
It does slightly change the way VoiceOver announces
menulists: it announces "combobox" instead of "popup button",
but semantically combobox is still appropriate per
https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-onlyFixes: #5424
- Remove the delete button below the style table
- Make selected rows stand out less. They will only have an outline,
like focused rows. This should remove the impression that this is the
table where one selects the style for citations.
- Add minus icon buttons to each row to delete the style without having
to select the row. The icon of the selected row is focusable, so it
can be tabbed onto.
- improve labels and appearance of buttons to add a new style
- move "Reset Styles…" to "Cite" section and rename to "Restore Default
Styles…"
Revert change from 8e2790e2d2.
Post fx140, dragstart fires fine on rows that are not
yet selected. This allows us to remove the workaround that
limited pointer events to the rows of virtualized table (vs its cells).
With it, we no longer need most of the manual handling
of the tooltip in virtualized table - just adding title attribute is enough.
We also don't need to add extra mouse events handling on
clickable button columns as in citationDialog - we can use
proper :hover and :activate effects, as well as attach
click handler directly to the button.
On non-macOS platforms, Delete (not Backspace) on a table row
will remove all of this item's bubbles from the citation.
This is to be consistent with similar delete operation
handling in other tables.
On macOS, this is still done via Backspace as before.
Per https://github.com/zotero/zotero/pull/5518#discussion_r2310293170
We were skipping updating of `clientDateModified` in order to prevent an
attachment item upload, but that hasn't been used since Zotero 4. This
might mean that, in some rare situations (e.g., a filename that needed to
be shortened due to filesystem path length?), people in read-only or
non-files-editable groups may have ended up triggering access errors and
needing to reset local data after a file download.
Now, we properly skip marking the attachment item as unsynced.
We've always done this, but it's no longer necessary:
- If a file exists locally when a remote filename change comes in, we
now rename the local file.
- If a file doesn't exist locally and it's a single file, we save the
file with the new filename on the next file download.
- If a file doesn't exist locally and it's an old multi-file snapshot,
we now try to find the primary HTML file and rename it.
If a file was renamed remotely and a new copy wasn't uploaded for some
reason, the ZIP wouldn't contain the new filename. We already renamed a
single file within the ZIP to match the new filename, but now we also
rename a single HTML file in old multi-file snapshot ZIPs. If there are
multiple HTML files for some reason (old-style ZIP with iframes?), we
let the user fix it.
And then we can stop reuploading files after renames.
Previously, the local file wasn't renamed, so it would become unlinked.
Since we currently force reuploading/reregistering of files when they're
renamed, opening the attachment would then redownload the modified
remote file, but there's no need for the file to become unlinked in the
first place.