Skip to content

InputBase throws on Dispose if not in EditContext #30990

Closed

Description

@NikolaosWakem

Seems that if you add an InputSelect and forget to put it inside an EditContext it causes a great Exception to be thrown but sadly then throws null exception in the finally instead...

image

Activity

  1. removed their assignment
    on Mar 15, 2021
  2. transferred this issue fromdotnet/sdkon Mar 15, 2021
  3. transferred this issue fromdotnet/roslynon Mar 17, 2021
  4. javiercn commented on Mar 17, 2021

    @javiercn
    Member

    @NikolaosWakem thanks for contacting us.

    Inputs like InputText are not meant to be used outside of an EditFrom/EditContext

  5. javiercn commented on Mar 17, 2021

    @javiercn
    Member

    @SteveSandersonMS this is what I ran into the other day in a more "subtle" way.

  6. added
    bugThis issue describes a behavior which is not expected - a bug.
    on Mar 18, 2021
  7. NikolaosWakem commented on Mar 18, 2021

    @NikolaosWakem
    Author

    @NikolaosWakem thanks for contacting us.

    Inputs like InputText are not meant to be used outside of an EditFrom/EditContext

    Yes - I realise that.. but code shouldn't throw a null exception in a dispose

    This bug means the real exception is lost.. I had to step into the framework to find what was causing a random null exception

  8. SteveSandersonMS commented on Mar 31, 2021

    @SteveSandersonMS
    Member

    Thanks for reporting this. Hopefully it should be a very simple fix if anyone in the community is interested in sending a PR.

  9. modified the milestones: Backlog, 6.0-preview4 on Apr 3, 2021
  10. added a commit that references this issue on Apr 10, 2021
  11. ghost locked as resolved and limited conversation to collaborators on May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-blazorIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.good first issueGood for newcomers.help wantedUp for grabs. We would accept a PR to help resolve this issue

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions