Skip to content

Commit b1d587a

Browse files
authored
Merge pull request #406 from mashmatrix/fix-lookup-candidate-focus
Fix to catch focus in candidate list DOM on click in candidate list
2 parents 49afc2b + cacbb19 commit b1d587a

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

src/scripts/Lookup.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,7 @@ class LookupCandidateList<LookupEntry extends Entry> extends Component<
533533
className={lookupMenuClassNames}
534534
style={listStyles}
535535
role='listbox'
536+
tabIndex={-1}
536537
onKeyDown={this.onKeyDown}
537538
>
538539
{header ? <div className='slds-lookup__item'>{header}</div> : undefined}

test/storyshots/__snapshots__/storyshots.test.js.snap

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34269,6 +34269,7 @@ exports[`Storyshots Lookup Opened - Active 1`] = `
3426934269
"minWidth": "15rem",
3427034270
}
3427134271
}
34272+
tabIndex={-1}
3427234273
>
3427334274
<ul
3427434275
className="slds-lookup__list"
@@ -36878,6 +36879,7 @@ exports[`Storyshots Lookup Opened - In Loading 1`] = `
3687836879
"minWidth": "15rem",
3687936880
}
3688036881
}
36882+
tabIndex={-1}
3688136883
>
3688236884
<ul
3688336885
className="slds-lookup__list"
@@ -37020,6 +37022,7 @@ exports[`Storyshots Lookup Opened - With list header/footer 1`] = `
3702037022
"minWidth": "15rem",
3702137023
}
3702237024
}
37025+
tabIndex={-1}
3702337026
>
3702437027
<div
3702537028
className="slds-lookup__item"
@@ -40302,6 +40305,7 @@ exports[`Storyshots Lookup defaultOpened - Active 1`] = `
4030240305
"minWidth": "15rem",
4030340306
}
4030440307
}
40308+
tabIndex={-1}
4030540309
>
4030640310
<ul
4030740311
className="slds-lookup__list"
@@ -42911,6 +42915,7 @@ exports[`Storyshots Lookup defaultOpened - In Loading 1`] = `
4291142915
"minWidth": "15rem",
4291242916
}
4291342917
}
42918+
tabIndex={-1}
4291442919
>
4291542920
<ul
4291642921
className="slds-lookup__list"
@@ -43053,6 +43058,7 @@ exports[`Storyshots Lookup defaultOpened - With list header/footer 1`] = `
4305343058
"minWidth": "15rem",
4305443059
}
4305543060
}
43061+
tabIndex={-1}
4305643062
>
4305743063
<div
4305843064
className="slds-lookup__item"

yarn.lock

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4686,15 +4686,10 @@ can-use-dom@^0.1.0:
46864686
resolved "https://registry.yarnpkg.com/can-use-dom/-/can-use-dom-0.1.0.tgz#22cc4a34a0abc43950f42c6411024a3f6366b45a"
46874687
integrity sha1-IsxKNKCrxDlQ9CxkEQJKP2NmtFo=
46884688

4689-
caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30001097:
4690-
version "1.0.30001099"
4691-
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001099.tgz#540118fcc6842d1fde62f4ee5521d1ec6afdb40e"
4692-
integrity sha512-sdS9A+sQTk7wKoeuZBN/YMAHVztUfVnjDi4/UV3sDE8xoh7YR12hKW+pIdB3oqKGwr9XaFL2ovfzt9w8eUI5CA==
4693-
4694-
caniuse-lite@^1.0.30001254:
4695-
version "1.0.30001258"
4696-
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001258.tgz#b604eed80cc54a578e4bf5a02ae3ed49f869d252"
4697-
integrity "sha1-tgTu2AzFSleOS/WgKuPtSfhp0lI= sha512-RBByOG6xWXUp0CR2/WU2amXz3stjKpSl5J1xU49F1n2OxD//uBZO4wCKUiG+QMGf7CHGfDDcqoKriomoGVxTeA=="
4689+
caniuse-lite@^1.0.30000951, caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30001093, caniuse-lite@^1.0.30001097:
4690+
version "1.0.30001313"
4691+
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001313.tgz"
4692+
integrity sha512-rI1UN0koZUiKINjysQDuRi2VeSCce3bYJNmDcj3PIKREiAmjakugBul1QSkg/fPrlULYl6oWfGg3PbgOSY9X4Q==
46984693

46994694
capture-exit@^2.0.0:
47004695
version "2.0.0"

0 commit comments

Comments
 (0)