Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: "Invariant Violation: Expected targetIds to be registered." (#3409)
* fix: "Invariant Violation: Expected targetIds to be registered." We've sporadically seen this error from customers. The call stack indicates that it's originating from HTML5BackendImpl's handleTopDragOver's requestAnimationFrame callback. I've been unable to reproduce it locally; however, if I simulate a slowdown by replacing `requestAnimationFrame(callback)` with `setTimeout(callback, 10000)`, I can fairly reliably reproduce this error. To fix it, I believe HTML5BackendImpl should consistently clear the hover animation whenever the drag operation is ended for any reason. I locally tested this fix in the v15.1.2 tag, and it appeared to work. Fixes #763, #3403 * chore: semver * fix: cancel any raf before creating a new one Co-authored-by: Chris Trevino <chtrevin@microsoft.com>
- Loading branch information
1 parent
0830641
commit 32b0bbf
Showing
5 changed files
with
63 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Version Check | ||
on: [push, pull_request] | ||
env: | ||
DEFAULT_NODE_VERSION: 16 | ||
jobs: | ||
version-check: | ||
runs-on: ubuntu-latest | ||
if: "github.ref != 'main' && github.head_ref != 'main' && !contains(github.ref , 'release/') && !contains(github.head_ref , 'release/') && !contains(github.ref , 'dependabot/') && !contains(github.head_ref , 'dependabot/')" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{env.DEFAULT_NODE_VERSION}} | ||
- run: yarn version check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
releases: | ||
react-dnd-html5-backend: patch | ||
|
||
declined: | ||
- react-dnd-documentation | ||
- react-dnd-examples | ||
- test-suite-cra | ||
- test-suite-vite | ||
- react-dnd-test-utils |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters