Commit graph

9902 commits

Author SHA1 Message Date
Adomas Venčkauskas
3ff650f046 Limit the force-click during drag fix to macOS (4fb0661b) 2022-08-11 02:34:29 -04:00
Adomas Venčkauskas
9feb2fc6cf Fix alt-arrow not working on macOS when editing collection names.
Fixes #2651
2022-08-11 02:34:24 -04:00
Adomas Venčkauskas
1937220099 Fix force-click during drag sometimes causing collections to switch
Closes #2652
2022-08-11 02:34:17 -04:00
Abe Jellinek
48ad6dcb99 Fix error if New Collection prompt is canceled 2022-08-11 02:34:12 -04:00
Dan Stillman
3fb9e2162e Use String.fromCharCode() to load Chinese characters in strToDate() test
Follow-up to dc045250a6
2022-08-11 02:34:06 -04:00
Dan Stillman
56151a4198 Fix parsing of Chinese and other non-ASCII month names
https://forums.zotero.org/discussion/97683/bug-locale-issues-concerning-zotero-and-zotero-connector
2022-08-11 02:33:58 -04:00
Dan Stillman
c8cc97dd97 Properly strip ZWJ in isOnlyEmoji() 2022-08-11 02:33:54 -04:00
Dan Stillman
011b60af61 Fix Emoji detection
And move to Zotero.Utilities.Internal.isOnlyEmoji()

Fixes #2643
2022-08-11 02:33:41 -04:00
Abe Jellinek
3481def4f6 Fix sorting by attachment (#2586) 2022-08-11 02:33:03 -04:00
Dan Stillman
d14700606d Update locales from Transifex and merge new English strings 2022-08-11 02:32:54 -04:00
Dan Stillman
6828e24481 citeproc-js: Add space after left margin in plain-text mode
This adds a space after the the number in some numeric styles ("[1]" in
IEEE style, "1." in Nature) when pasting bibliography entries into a
plain-text editor.

Some styles (ACS, AMA, Vancouver) will need to be updated to remove
their hard-coded spaces to avoid double spaces after this change.

Patch from @zepinglee

Fixes #2633
2022-08-11 02:32:39 -04:00
Martynas Bagdonas
bfc61a69ba Add support for PDF page deletion and rotation (#2595)
* Add support for PDF page deletion and rotation
Fixes #2561
2022-08-11 02:32:30 -04:00
Adomas Venčkauskas
44e8a372e5 Fix a MIMETypeHandler.removeHandler() bug 2022-08-11 02:31:33 -04:00
Adomas Venčkauskas
1687d4caad Improve downloadPDFViaBrowser handlers and logging 2022-08-11 02:31:28 -04:00
Adomas Venčkauskas
f88cc8b988 Fix cookieSandbox not overriding user agent if no cookies for domain.
Potential fix for #2635
2022-08-11 02:31:23 -04:00
Martynas Bagdonas
266ea99a77 Fix library tab tooltip always staying on top 2022-08-11 02:31:15 -04:00
Dan Stillman
b1c2b9e005 Fix detection of some emoji set as colored tags
Emoji such as ️ that began as text-based Unicode characters and depend
on Variation Selector-16 to display the emoji presentation weren't being
properly detected.
2022-08-11 02:31:01 -04:00
Dan Stillman
fdff93a961 Update locales from Transifex 2022-08-11 02:29:18 -04:00
Dan Stillman
5eecc3fc54 Add prefs for timeouts for downloading PDF via browser
1 second isn't enough for some users, so try 1.5, and allow for easier
debugging via a pref.

https://forums.zotero.org/discussion/96431/i-have-access-to-pdf-but-zotero-cannot-automatically-add-it
https://forums.zotero.org/discussion/97277/unable-to-download-papers-using-zotero-chrome-extension
2022-08-11 02:28:16 -04:00
Dan Stillman
cb2594f53f Feed import: Don't fail on OPML entry with no title or text
https://forums.zotero.org/discussion/96841/impossible-dimporter-ompl-rss
2022-08-11 02:28:03 -04:00
Martynas Bagdonas
b98a5e0545 Avoid error interrupting annotation extraction from multiple items 2022-08-11 02:25:43 -04:00
Dan Stillman
477dd69d54 Update locales from Transifex 2022-08-11 02:25:43 -04:00
Dan Stillman
82eb701ea7 Try to open external PDF reader to page number for "Show on Page"
PDF-handling code from `ZoteroPane.viewAttachment()` predates
`Zotero.OpenPDF` and didn't handle page numbers for external PDF
readers, so when called from "Show on Page" in a note (via
`ZoteroPane.viewPDF()`) it just launched the file itself in the
specified handler or via the OS.

For now, change to use `Zotero.OpenPDF.openToPage()` when there's a page
number. Later we should use `Zotero.OpenPDF` for everything, but that
code is more complicated than just using `launchFile()`, so we'll need
to do some testing (particularly on Linux) to see what's best.

(Note that "Show on Page" with an external reader doesn't make a ton of
sense, since you can't actually see the annotation, but opening the
right page is better than nothing.)

Fixes #2612
2022-08-11 02:25:43 -04:00
Abe Jellinek
139d92054f Scaffold templates: Pull URL from doc
Link URLs could lead to redirects.
2022-08-11 02:25:43 -04:00
Abe Jellinek
7d3e95e050 Fix Scaffold load error when fontSize pref is set 2022-08-11 02:25:43 -04:00
Abe Jellinek
8d75f37548
fx-compat: Add preferences with full-text/keyword search (#2659) 2022-08-10 18:26:23 -04:00
Abe Jellinek
db600cb5b9 fx-compat: Item box: Don't set flex attribute on HTML elements 2022-08-08 14:52:17 -04:00
Dan Stillman
78b0055206 Change app id to zotero@zotero.org
And remove all references to old id

We can do this because plugins will use new mechanisms for install and
update manifests that don't use the id (which also means it's now only
used internally).
2022-08-08 05:11:21 -04:00
Dan Stillman
ef33731490 fx-compat: Add message to Add-ons pane when no plugins installed
We'll want to update the rest of the instances of "extensions" or
"add-ons" to say "plugins" (unless we think we might support themes, in
which case we can keep "add-ons").
2022-08-06 03:49:40 -04:00
Abe Jellinek
cd296b1f37 fx-compat: Item box: Fix _*FieldValue(), more focus issues
_getFieldValue() and _setFieldValue() were using `.value` instead of
`.textContent`, so the few places that use it were getting/setting ignored
fields on divs.

fbc25834 messed up the tab index logic, shifting the responsibility for
preserving _lastTabIndex across refreshes: originally, the default was to throw
it away, and the caller was responsible for saving and restoring it if the
refresh was caused by tabbing between fields. The bad commit reversed the
situation and made the item box *remember* the _lastTabIndex by default,
meaning that a refresh caused by the notifier, for example, would focus the
last focused field even if it had been closed by the user in the meantime.

That bad change was a misguided attempt to fix the Tab key cycling infinitely
between Item Type, Title, and creators and never reaching further fields. The
actual fix was just to add `, textarea` to the query on line 1459.
2022-08-05 16:12:28 -04:00
Abe Jellinek
1ecc0b113b fx-compat: Item box: Fix auto-scroll functions 2022-08-05 12:32:03 -04:00
Abe Jellinek
cb14564174 fx-compat: Item box: Prevent editor from reopening after close
We did need to reset _lastTabIndex as the line removed in fbc25834 did, but
only immediately surrounding the saveTx() call.
2022-08-05 12:10:16 -04:00
Abe Jellinek
57abea5416 fx-compat: Item box: Remove some dead code
All already being handled by CSS (besides the exact character length limits, but
it's not clear that we really need those - we just ellipsize if it visually
overflows now, which seems fine).
2022-08-05 11:57:54 -04:00
Abe Jellinek
4e6fe4d119 fx-compat: Remove temp item type menulist logging 2022-08-05 11:49:14 -04:00
Abe Jellinek
1c36406b1e fx-compat: Item box: Fix removing creator while editing it 2022-08-05 11:45:58 -04:00
Abe Jellinek
361a83c378 fx-compat: Item box: Restore batch paste behavior
Since <input>s are single-line, we do the split operation on paste instead of on
blur.
2022-08-05 11:45:58 -04:00
Dan Stillman
53a09bb912 Add reason parameter for plugin bootstrap methods
As documented on https://wiki.mozilla.org/Extension_Manager:Bootstrapped_Extensions

And fix method names for `install()` and `uninstall()`
2022-08-05 04:51:07 -04:00
Dan Stillman
51f9150410 fx-compat: Initial plugin support
Plugins are ZIPs containing at least these two files:

- manifest.json: A WebExtension MV2 manifest with basic metadata
  properties and `applications.gecko` with `id` and `update_url`
- bootstrap.js: A bootstrap file, similar to old bootstrapped extensions,
  with `installed()`, `startup()`, `shutdown()`, and `uninstalled()`
2022-08-05 01:08:51 -04:00
Dan Stillman
e82e808f2b Update definition style of Zotero.log() and Zotero.logError() 2022-08-05 01:08:51 -04:00
Dan Stillman
e6256d60ec fx-compat: Fix logging to the browser console 2022-08-05 01:08:51 -04:00
Abe Jellinek
080ada78ee fx-compat: Item box: Prevent tabbing to hidden firstName 2022-08-04 17:20:01 -04:00
Abe Jellinek
fbc2583433 fx-compat: Item box: Fix tabbing 2022-08-04 17:02:41 -04:00
Abe Jellinek
7a22458ed4 fx-compat: Item box: Fix fieldMode resetting on blur
The fieldMode attribute of the input was being set by the call to
switchCreatorMode(), but it didn't carry over to the label that replaces it on
line 1997.

Also removed a debug line and cleaned up a bit.
2022-08-04 16:50:48 -04:00
Abe Jellinek
581f4bdf7b fx-compat: Fix parameter name typo 2022-08-04 15:10:32 -04:00
Abe Jellinek
617ede481a fx-compat: Add roles to banners
Fixes #2655 (with 0983ff)
2022-08-04 14:52:16 -04:00
Abe Jellinek
c7fc98dff6 fx-compat: editContextMenu -> editMenuOverlay
To reflect that it now handles the menu bar Edit menu as well.
2022-08-02 15:50:44 -04:00
Abe Jellinek
64155bf58f fx-compat: Fix edit context menu
The menupopup needs to be in a popupset to show correctly.
2022-08-02 15:49:06 -04:00
Abe Jellinek
27841acb83 fx-compat: Select items dialog: Fix search and make functional 2022-08-01 15:39:57 -04:00
Abe Jellinek
f8ac57bdb1 fx-compat: Don't focus dropdown in quick search textbox
To match old behavior and fix autofocus.
2022-08-01 15:22:25 -04:00
Abe Jellinek
d018133e9b fx-compat: Use html-tooltip everywhere
And convert tooltiptext attributes on item box HTML elements to titles.
2022-08-01 15:02:42 -04:00