Fix IgxGridSelectionService.generateRange crash on drag-select released outside grid#17349
Open
mvanhorn wants to merge 1 commit into
Open
Fix IgxGridSelectionService.generateRange crash on drag-select released outside grid#17349mvanhorn wants to merge 1 commit into
mvanhorn wants to merge 1 commit into
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #17335
Description
generateRangeno longer throws when the selection anchor isnull; it returns an empty range for that case instead of dereferencing the missing anchor.Motivation / Context
When the range generator was called before a selection anchor was set (a
nullanchor), it dereferenced the anchor and threw, surfacing as a runtime crash in the consuming grid/selection logic. Guarding the null anchor returns a sensible empty range and avoids the crash. Closes #17335.Type of Change (check all that apply):
Component(s) / Area(s) Affected:
Selection / range generation utility.
How Has This Been Tested?
Test Configuration:
Screenshots / Recordings
N/A — non-visual bug fix.
Checklist:
AI was used for assistance.