mirror of
https://github.com/zotero/zotero.git
synced 2026-09-24 00:51:37 +00:00
Item box: Prevent tabbing to hidden fields
This one's probably been around for a while! Reproduce by creating an
item with a fieldMode = 1 creator, tabbing past the creator, and then
shift-tabbing back to it. Your cursor will end up in the invisible first
name field and further shift-tabs can't move it past.
Cherry-picked from fx102: 080ada78ee
This commit is contained in:
parent
7ec54fdaa9
commit
bb2b37a73a
1 changed files with 6 additions and 2 deletions
|
|
@ -2323,7 +2323,9 @@
|
|||
if (back) {
|
||||
Zotero.debug('Looking for previous tabindex before ' + tabindex, 4);
|
||||
for (let i = tabbableFields.length - 1; i >= 0; i--) {
|
||||
if (parseInt(tabbableFields[i].getAttribute('ztabindex')) < tabindex) {
|
||||
let field = tabbableFields[i];
|
||||
let tabIndexHere = parseInt(field.getAttribute('ztabindex'));
|
||||
if (tabIndexHere !== -1 && tabIndexHere < tabindex) {
|
||||
next = tabbableFields[i];
|
||||
break;
|
||||
}
|
||||
|
|
@ -2332,7 +2334,9 @@
|
|||
else {
|
||||
Zotero.debug('Looking for tabindex ' + tabindex, 4);
|
||||
for (var pos = 0; pos < tabbableFields.length; pos++) {
|
||||
if (parseInt(tabbableFields[pos].getAttribute('ztabindex')) >= tabindex) {
|
||||
let field = tabbableFields[pos];
|
||||
let tabIndexHere = parseInt(field.getAttribute('ztabindex'));
|
||||
if (tabIndexHere !== -1 && tabIndexHere >= tabindex) {
|
||||
next = tabbableFields[pos];
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue