Skip to content
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

MudDropZone: Fix NullReferenceException when dragging not tracked item onto MudDynamicDropItem (#4506) #4513

Merged
merged 2 commits into from
May 13, 2022
Merged

MudDropZone: Fix NullReferenceException when dragging not tracked item onto MudDynamicDropItem (#4506) #4513

merged 2 commits into from
May 13, 2022

Conversation

haas-daniel
Copy link
Contributor

Description

Adds check for transaction in progress in DragEnter handler in MudDynamicDropItem.

This fixes a NullReferenceException that is thrown when DragEnter is called by dragging a not tracked item onto MudDynamicDropItem.

Fixes #4506

How Has This Been Tested?

Tested with MudBlazor Docs app on local system and added unit test.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • The PR is submitted to the correct branch (dev).
  • My code follows the code style of this project.
  • I've added relevant tests.

@codecov
Copy link

codecov bot commented Apr 28, 2022

Codecov Report

Merging #4513 (ca88bd7) into dev (286e89d) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##              dev    #4513   +/-   ##
=======================================
  Coverage   91.27%   91.28%           
=======================================
  Files         362      362           
  Lines       12481    12489    +8     
=======================================
+ Hits        11392    11400    +8     
  Misses       1089     1089           
Impacted Files Coverage Δ
...or/Components/DropZone/MudDynamicDropItem.razor.cs 96.42% <100.00%> (+0.13%) ⬆️
...azor/Services/ResizeListener/BreakpointService .cs 93.02% <0.00%> (-0.09%) ⬇️
...azor/Components/DatePicker/MudBaseDatePicker.razor 97.72% <0.00%> (-0.06%) ⬇️
...r/Components/Autocomplete/MudAutocomplete.razor.cs 94.23% <0.00%> (+0.02%) ⬆️
...r/Components/DatePicker/MudBaseDatePicker.razor.cs 87.00% <0.00%> (+0.07%) ⬆️
src/MudBlazor/Components/Mask/MudMask.razor.cs 93.59% <0.00%> (+0.12%) ⬆️
...lazor/Components/Dialog/MudDialogProvider.razor.cs 86.11% <0.00%> (+1.26%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 286e89d...ca88bd7. Read the comment docs.

Copy link
Contributor

@just-the-benno just-the-benno left a comment

Choose a reason for hiding this comment

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

Hi @dhaas-phoenis and thanks for spending time resolving this issue.

There are some minor things, I'd like to see some changes before, we can merge your PR.

Your test has more code than needed (or maybe I don't see why are you reading the container twice?)
and your if statement can be simplified.

@just-the-benno
Copy link
Contributor

Thanks for your work and effort.

@henon Ready to be merged.

@henon henon merged commit 1ed3ea5 into MudBlazor:dev May 13, 2022
@henon henon added bug Something does not work as intended/expected bug-functional labels May 13, 2022
@henon henon added this to the 6.0.11 milestone May 13, 2022
jammerware pushed a commit to jammerware/MudBlazor that referenced this pull request Sep 20, 2022
…m onto MudDynamicDropItem (MudBlazor#4506) (MudBlazor#4513)

* MudDropZone: Fix NullReferenceException when dragging not tracked item onto DropItem (MudBlazor#4506)

* Remove unnecessary code from test case

Co-authored-by: Daniel Haas <dhaas84@gmail.com>
jammerware pushed a commit to jammerware/MudBlazor that referenced this pull request Sep 20, 2022
…m onto MudDynamicDropItem (MudBlazor#4506) (MudBlazor#4513)

* MudDropZone: Fix NullReferenceException when dragging not tracked item onto DropItem (MudBlazor#4506)

* Remove unnecessary code from test case

Co-authored-by: Daniel Haas <dhaas84@gmail.com>
jammerware pushed a commit to jammerware/MudBlazor that referenced this pull request Sep 20, 2022
…m onto MudDynamicDropItem (MudBlazor#4506) (MudBlazor#4513)

* MudDropZone: Fix NullReferenceException when dragging not tracked item onto DropItem (MudBlazor#4506)

* Remove unnecessary code from test case

Co-authored-by: Daniel Haas <dhaas84@gmail.com>
jammerware pushed a commit to jammerware/MudBlazor that referenced this pull request Sep 20, 2022
…m onto MudDynamicDropItem (MudBlazor#4506) (MudBlazor#4513)

* MudDropZone: Fix NullReferenceException when dragging not tracked item onto DropItem (MudBlazor#4506)

* Remove unnecessary code from test case

Co-authored-by: Daniel Haas <dhaas84@gmail.com>
3dots pushed a commit to 3dots/MudBlazor that referenced this pull request Mar 23, 2023
…m onto MudDynamicDropItem (MudBlazor#4506) (MudBlazor#4513)

* MudDropZone: Fix NullReferenceException when dragging not tracked item onto DropItem (MudBlazor#4506)

* Remove unnecessary code from test case

Co-authored-by: Daniel Haas <dhaas84@gmail.com>
ScarletKuro pushed a commit to ScarletKuro/MudBlazor that referenced this pull request Mar 27, 2023
…m onto MudDynamicDropItem (MudBlazor#4506) (MudBlazor#4513)

* MudDropZone: Fix NullReferenceException when dragging not tracked item onto DropItem (MudBlazor#4506)

* Remove unnecessary code from test case

Co-authored-by: Daniel Haas <dhaas84@gmail.com>
ferraridavide pushed a commit to ferraridavide/MudBlazor that referenced this pull request May 30, 2023
…m onto MudDynamicDropItem (MudBlazor#4506) (MudBlazor#4513)

* MudDropZone: Fix NullReferenceException when dragging not tracked item onto DropItem (MudBlazor#4506)

* Remove unnecessary code from test case

Co-authored-by: Daniel Haas <dhaas84@gmail.com>
ilovepilav pushed a commit to ilovepilav/MudBlazor that referenced this pull request Nov 25, 2023
…m onto MudDynamicDropItem (MudBlazor#4506) (MudBlazor#4513)

* MudDropZone: Fix NullReferenceException when dragging not tracked item onto DropItem (MudBlazor#4506)

* Remove unnecessary code from test case

Co-authored-by: Daniel Haas <dhaas84@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something does not work as intended/expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MudDropZone: NullReferenceException when dragging text into a MudDropZone
3 participants