-
Notifications
You must be signed in to change notification settings - Fork 665
List: fix border cases on dragging first or last items using KBN (T1320189) #32334
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
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.
Pull request overview
This PR fixes a list keyboard-reordering edge case where using Shift+Arrow on boundary items could cause a runtime error, and adds regression tests to cover the behavior.
Changes:
- Guard
ListEdit’s keyboard-based reordering logic against missing destination items so Shift+Arrow on out-of-range indices exits safely without throwing. - Add QUnit tests to verify that Shift+ArrowUp on the first item and Shift+ArrowDown on the last item do not throw and keep the item order unchanged.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
packages/devextreme/js/__internal/ui/list/list.edit.ts |
Adds a null check for the next item element before computing group boundaries and calling reorderItem, preventing a TypeError when trying to move beyond list bounds. |
packages/devextreme/testing/tests/DevExpress.ui.widgets/listParts/editingTests.js |
Introduces two keyboard navigation tests that reproduce the Shift+ArrowUp/Down boundary scenarios and assert that the items order remains unchanged (regression coverage for T1320189). |
packages/devextreme/testing/tests/DevExpress.ui.widgets/listParts/editingTests.js
Outdated
Show resolved
Hide resolved
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.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
packages/devextreme/testing/tests/DevExpress.ui.widgets/listParts/editingTests.js
Outdated
Show resolved
Hide resolved
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.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
packages/devextreme/testing/tests/DevExpress.ui.widgets/listParts/editingTests.js
Show resolved
Hide resolved
packages/devextreme/testing/tests/DevExpress.ui.widgets/listParts/editingTests.js
Show resolved
Hide resolved
…'get') occurs when using Shift + Up Arrow on the first item (DevExpress#32334)
…'get') occurs when using Shift + Up Arrow on the first item (DevExpress#32334)
No description provided.