diff --git a/src/components/Bullet.tsx b/src/components/Bullet.tsx index a4ff06c6ca..9b7fd13758 100644 --- a/src/components/Bullet.tsx +++ b/src/components/Bullet.tsx @@ -20,6 +20,7 @@ import getThoughtById from '../selectors/getThoughtById' import isContextViewActive from '../selectors/isContextViewActive' import isMulticursorPath from '../selectors/isMulticursorPath' import rootedParentOf from '../selectors/rootedParentOf' +import fastClick, { type FastClickEvent } from '../util/fastClick' import hashPath from '../util/hashPath' import head from '../util/head' import isDivider from '../util/isDivider' @@ -531,9 +532,7 @@ const Bullet = ({ // expand or collapse on click // has some additional logic to make it work intuitively with pin true/false const clickHandler = useCallback( - (e: React.MouseEvent) => { - // stop click event from bubbling up to Content.clickOnEmptySpace - e.stopPropagation() + (e: FastClickEvent) => { // short circuit if dragHold // useLongPress stop is activated in onMouseUp but is delayed to ensure that dragHold is still true here // stopping propagation from useLongPress was not working either due to bubbling order or mismatched event type @@ -605,7 +604,9 @@ const Bullet = ({ paddingBottom: extendClickHeight + 2, width, }} - onClick={clickHandler} + {...fastClick(clickHandler)} + // stop click event from bubbling up to Content.clickOnEmptySpace + onClick={e => e.stopPropagation()} >