Skip to content

Commit

Permalink
fix: use isSmallScreenWidth inside longpress callback instead of useF…
Browse files Browse the repository at this point in the history
…ocusEffect
  • Loading branch information
redpanda-bit committed Sep 26, 2023
1 parent cc87d7e commit 3ce5f60
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/components/LHNOptionsList/OptionRowLHN.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,6 @@ function OptionRowLHN(props) {
useCallback(() => {
isFocusedRef.current = true;
return () => {
if (!isSmallScreenWidth) {
return;
}
isFocusedRef.current = false;
};
}, []),
Expand All @@ -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);
Expand Down

0 comments on commit 3ce5f60

Please sign in to comment.