From 3ce5f6065b0b851a01a5e9ca2216007d21487432 Mon Sep 17 00:00:00 2001 From: Carlos Dario Almonte Date: Fri, 22 Sep 2023 08:38:40 -0400 Subject: [PATCH] fix: use isSmallScreenWidth inside longpress callback instead of useFocusEffect --- src/components/LHNOptionsList/OptionRowLHN.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/components/LHNOptionsList/OptionRowLHN.js b/src/components/LHNOptionsList/OptionRowLHN.js index 1217caa7d3dd..486e0b4f7860 100644 --- a/src/components/LHNOptionsList/OptionRowLHN.js +++ b/src/components/LHNOptionsList/OptionRowLHN.js @@ -115,9 +115,6 @@ function OptionRowLHN(props) { useCallback(() => { isFocusedRef.current = true; return () => { - if (!isSmallScreenWidth) { - return; - } isFocusedRef.current = false; }; }, []), @@ -128,7 +125,7 @@ function OptionRowLHN(props) { * @param {Object} [event] - A press event. */ const showPopover = (event) => { - if (!isFocusedRef.current) { + if (!isFocusedRef.current && isSmallScreenWidth) { return; } setIsContextMenuActive(true);