Skip to content

Commit

Permalink
Block Editor: Clear toolbar timeout by ref on unmount
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth committed Feb 28, 2020
1 parent dc4c3a6 commit d6024dc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/block-editor/src/components/block-toolbar/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ export function useDebouncedShowMovers( {
[ isFocused ]
);

useEffect( () => () => clearTimeout( timeoutRef.current ) );

return {
showMovers,
debouncedShowMovers,
Expand Down

0 comments on commit d6024dc

Please sign in to comment.