File tree Expand file tree Collapse file tree 4 files changed +3
-14
lines changed Expand file tree Collapse file tree 4 files changed +3
-14
lines changed Original file line number Diff line number Diff line change 6161 "flatpickr" : " 4.6.13" ,
6262 "invariant" : " ^2.2.3" ,
6363 "lodash.debounce" : " ^4.0.8" ,
64- "lodash.findlast" : " ^4.5.0" ,
6564 "lodash.omit" : " ^4.5.0" ,
6665 "lodash.throttle" : " ^4.1.1" ,
6766 "prop-types" : " ^15.7.2" ,
Original file line number Diff line number Diff line change 55 * LICENSE file in the root directory of this source tree.
66 */
77
8- import findLast from 'lodash.findlast' ;
98import { useEffect } from 'react' ;
109import {
1110 DOCUMENT_POSITION_BROAD_PRECEDING ,
@@ -62,10 +61,9 @@ function wrapFocus({
6261 currentActiveNode === startTrapNode ||
6362 comparisonResult & DOCUMENT_POSITION_BROAD_PRECEDING
6463 ) {
65- const tabbable = findLast (
66- bodyNode . querySelectorAll ( selectorTabbable ) ,
67- ( elem ) => Boolean ( elem . offsetParent )
68- ) ;
64+ const tabbable = [ ...bodyNode . querySelectorAll ( selectorTabbable ) ]
65+ . reverse ( )
66+ . find ( ( elem ) => Boolean ( elem . offsetParent ) ) ;
6967 if ( tabbable ) {
7068 tabbable . focus ( ) ;
7169 } else if ( bodyNode !== oldActiveNode ) {
Original file line number Diff line number Diff line change @@ -2031,7 +2031,6 @@ __metadata:
20312031 html-webpack-plugin: "npm:^5.5.0"
20322032 invariant: "npm:^2.2.3"
20332033 lodash.debounce: "npm:^4.0.8"
2034- lodash.findlast: "npm:^4.5.0"
20352034 lodash.omit: "npm:^4.5.0"
20362035 lodash.throttle: "npm:^4.1.1"
20372036 mini-css-extract-plugin: "npm:^2.4.5"
@@ -18617,13 +18616,6 @@ __metadata:
1861718616 languageName: node
1861818617 linkType: hard
1861918618
18620- "lodash.findlast@npm:^4.5.0":
18621- version: 4.6.0
18622- resolution: "lodash.findlast@npm:4.6.0"
18623- checksum: 10/ee7c3e6287ebab628b06449c8847aa00263f10b43bc67f1245e4b34c2edd80802148299f61e8577675790a05a4abe75ffdadacd0984a93724a69c7a01873fb1d
18624- languageName: node
18625- linkType: hard
18626-
1862718619"lodash.flatten@npm:^4.4.0":
1862818620 version: 4.4.0
1862918621 resolution: "lodash.flatten@npm:4.4.0"
You can’t perform that action at this time.
0 commit comments