Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove unnecessary variable declaration and clearTimeout
  • Loading branch information
t-hamano committed Nov 24, 2022
commit 11a1cfae0f0ad1203a8d58645982282e8c7bcd10
4 changes: 0 additions & 4 deletions packages/compose/src/hooks/use-constrained-tabbing/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ import useRefEffect from '../use-ref-effect';
*/
function useConstrainedTabbing() {
return useRefEffect( ( /** @type {HTMLElement} */ node ) => {
/** @type {number|undefined} */
let timeoutId;

function onKeyDown( /** @type {KeyboardEvent} */ event ) {
const { keyCode, shiftKey, target } = event;

Expand Down Expand Up @@ -72,7 +69,6 @@ function useConstrainedTabbing() {
node.addEventListener( 'keydown', onKeyDown );
return () => {
node.removeEventListener( 'keydown', onKeyDown );
clearTimeout( timeoutId );
};
}, [] );
}
Expand Down