Skip to content

Move dragHold into dispatch#3109

Merged
raineorshine merged 1 commit intocybersemics:mainfrom
ethan-james:3080-refactor-move-dragHold-into-dispatch
Jul 4, 2025
Merged

Move dragHold into dispatch#3109
raineorshine merged 1 commit intocybersemics:mainfrom
ethan-james:3080-refactor-move-dragHold-into-dispatch

Conversation

@ethan-james
Copy link
Collaborator

References #3080

This is about as much as I was able to accomplish re: #3081 (comment)

  1. If we're not tracking dragInProgress via useSelector, then we shouldn't need to do it for dragHold either
  2. It also removes a dependency from useEffect
  3. It adds e.preventDefault() to the existing dragInProgress condition, which may be unnecessary but I don't think is harmful
  4. It allows us to simplify (!globals.touching && (!editingOrOnCursor || !isVisible))

dragHold was being checked in order to fix this bug: #3023 (comment) and I verified that that bug is still fixed after moving it.

Copy link
Contributor

@raineorshine raineorshine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable. Thanks!

@raineorshine raineorshine merged commit 1fee57f into cybersemics:main Jul 4, 2025
3 checks passed
cindmichelle pushed a commit to cindmichelle/em that referenced this pull request Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants