-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix(#3842): DnD Nested Drop Regions example can't focus child drop target #3843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…rget Problem is with how we determine the dropTarget within the DragManager onFocus event handler. We need to prioritize the event.target matching a validDropTarget over a validDropTarget containing the event.target, otherwise the parent element may match first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Build successful! 🎉 |
Build successful! 🎉 |
Build successful! 🎉 |
expect(onDropEnter2).toHaveBeenCalledTimes(1); | ||
expect(onDropEnter).toHaveBeenCalledTimes(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strange, this means the test is showing that the nested drop region got focus first right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I seem to recall the test behaving in reverse order, but the storybook story behaving as expected. It was a while ago.
Build successful! 🎉 |
Build successful! 🎉 |
Build successful! 🎉 |
Build successful! 🎉 |
Build successful! 🎉 |
Build successful! 🎉 |
Build successful! 🎉 |
Build successful! 🎉 |
Build successful! 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will figure out the test later, and maybe look into sorting the valid drop targets so parents always come before children regardless of which order they are registered in. #2071
Build successful! 🎉 |
## API Changes
unknown top level export { type: 'identifier', name: 'Column' } |
Problem is with how we determine the dropTarget within the DragManager onFocus event handler. We need to prioritize the event.target matching a validDropTarget over a validDropTarget containing the event.target, otherwise the parent element may match first.
Closes #3842
✅ Pull Request Checklist:
📝 Test Instructions:
🧢 Your Project:
Adobe/Accessibility