- Don't import global Zotero SCSS
- I think this was always a mistake - preferences have their own
root SCSS file (preferences.scss) and don't need zotero.scss
- Don't add margins on radio or button labels
- Like above - I don't think this was correct even before the latest
button style tweaks!
- Don't add global margins
- Otherwise we start an arms race with all the other elements in the
pane - anything without a margin-inline-start will look like it's
sticking out to the left. Apply specific margins instead.
Tweak to the conditional to check if something is focused
via selection.count (instead of selection.focused which
defaults to 0 and fails on the first focused item).
Post: 40fd5efe05.
Fixes: #4444
* New `attachmentTitle` field, returns the title of the current attachment (or
the future title of the attachment being created)
* New function `match` to enable testing values with a regex.
* New function `start` to enable truncating from the beginning.
* Ignore new line characters in the template for easier editing.
* Avoid repeated characters when changing case (snake/dash)
* Increase the size of the template input field.
Closes#3252
After redesign, tab order became: quickSearch -> itemTree ->
cancel and accept buttons -> collectionTree.
This restores original tab sequence: quickSearch -> collectionTree ->
itemsTree -> cancel and accept buttons.
Instead of focusing the first condition, which ends up placing
focus in the middle of the new window or modal. It is best
to focus the first node, which is the general convention,
per https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/, and
what many screen reader users expect. When we focus a field in
the middle of the window/dialog, it makes it seem for some users
that this is the first node, which will make them miss all the
fields above it.
Also, linked search name input to its label in searchDialog.xhtml.
<panel> takes over Escape handling by just closing the popup via
what looks like a capturing listener on document, since Escape
keydown events never even reach the popup itself. When the popup
is just closed like that, tagsBox is blurred so all unwanted edits get saved.
To properly handle Escape, attach our own capturing listener that will
reset all edits before the popup is closed.
Fixes: #4398
- Mozilla's ActorManagerParent was only being imported when devtools
were initialized (either by opening the Error Console or by connecting
via remote debugging). Import it in our ActorManager so Mozilla
actors, including AutoScroll, are always registered.
- This may have other effects! I'm assuming most of us test with
the error console visible, though, so we would've had Mozilla
actors, while users running without devtools wouldn't have. We
definitely want those actors. (Most of them, at least.)
- Don't override autoscroller styles with our panel customizations.
After react 18 update, the tab node may not yet be rendered
by tabBar.jsx when we try to scroll it into view in Zotero_Tabs.select.
- To make sure scrolling happens when rendering is done, move scroll-related
logic into a useEffect of tabBar.jxs. It also makes sure that we'll scroll to
a selected tab if it is moved via context menu to the very beginning or the end.
- Added a small scroll-padding to tabs container to make sure the border
does not get cutoff after the tab is scrolled into view instead of
JS code accounting for the border.
- Fixed a glitch where the pinned library tab would not get selected
on shift-tab from opened tabs menu.
Fixes: #4382
* vpat 48: announce selection for default virt table
For simpler virtualized tables
(e.g. style manager in Zotero_Preferences.Cite), the table
does not get re-rendered when selection changes, so
aria-activedescendant does not get updated in render().
- a single function to update aria-activedescendant of the table
- call it in _updateTree of the tree selection because _onSelection
is not called the very first time a table is rendered. In that case, after
restart, collectionTree would have a selected row but no aria-activedescendant
- remove this.forceUpdate() from selection handlers of itemTree and
collectionTree because judging by the coment it's main purpose was to set
aria-activedescendant through render()
- set aria-activedescendant in _onSelection handler
of virtualized table.
- construct and set aria-label for rows build via
makeRowRenderer of VirtualizedTable so that is is
announced when the row is selected.
- remove earlier shift-Enter behavior that makes tag's
input multiline.
- shift-Enter will function just as Enter by saving the
tag and allowing focus to return to reader or itemTree.
- except after pasting multiple tags which will still turn
the tags input into a multiline field. Then, shift-enter
will add a new line, just as with any other multiline
editable-text.
- focus will always enter the tagsBox popup opened from the reader
- escape from within the popup with tagsBox will close the popup (vpat
67)
- one should not be able to collapse the tagsBox. Added `collapsible`
getter and setters to the collapsible panel to prevent the section
from changing its open status. This may be also used in other cases,
such as to prevent itemBox from being collapsed in duplicates mode.
- patched a glitch where tab from the last empty tab input would loose
focus.
- changed the `menupopup` for `panel` to display the `tagsbox` because
`menupopup` has implicit `role="menu"` which is not meant to contain
inputs, so voiceover completely looses cursor when inputs are focused
inside of the popup. Also, tweaked spacing a bit to avoid the
focus-ring getting cutoff.
Addresses: #4222Fixes: #4230Fixes: #4226
Addresses: #4388
As opposed to 'change' event.
Because if the field is editted and another window is focused
while the cursor is in the field, the change event will be
swallowed and when the field finally looses focus, it will not
be saved.
This may address the reported issue of edits not being saved in
title and abstract fields.
Addresses: #4388
- display the first continuous span of emojis in the primary cell of
the itemTree for non-colored tags.
- the emojis appear after the colored tags' circles (if any)
- to keep things consistent with itemTree, sort tags in the tagsBox in
the following order: colored tags first sorted by their position,
emoji tags after sorted alphabetically, followed by remaining tags sorted
alphabetically.