Skip to content

Commit

Permalink
Fix typo: Scrollalbe => Scrollable (#17304)
Browse files Browse the repository at this point in the history
  • Loading branch information
technote-space authored and Soean committed Sep 2, 2019
1 parent 79d2886 commit c9b7c9b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/components/src/popover/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ const SLOT_NAME = 'Popover';
* Hook used trigger an event handler once the window is resized or scrolled.
*
* @param {Function} handler Event handler.
* @param {Object} ignoredScrollalbeRef scroll events inside this element are ignored.
* @param {Object} ignoredScrollableRef scroll events inside this element are ignored.
*/
function useThrottledWindowScrollOrResize( handler, ignoredScrollalbeRef ) {
function useThrottledWindowScrollOrResize( handler, ignoredScrollableRef ) {
// Refresh anchor rect on resize
useEffect( () => {
let refreshHandle;
const throttledRefresh = ( event ) => {
window.cancelAnimationFrame( refreshHandle );
if ( ignoredScrollalbeRef && event && event.type === 'scroll' && ignoredScrollalbeRef.current.contains( event.target ) ) {
if ( ignoredScrollableRef && event && event.type === 'scroll' && ignoredScrollableRef.current.contains( event.target ) ) {
return;
}
refreshHandle = window.requestAnimationFrame( handler );
Expand Down

0 comments on commit c9b7c9b

Please sign in to comment.