Welcome to the Blazor feedback portal. We’re happy you’re here! If you have feedback on how to improve the Blazor, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

The OnClose and Closing events get triggered even after using e.Cancel in OnOpen to cancel the "Open" action of the dropdown.

Steps to Reproduce

Setup:

  1. Instrument the opening/closing events so you can track which are fired.
  2. Use e.Cancel in the OnOpen event handler to cancel the "Open" action.

Steps:

  1. Click the dropdown.
  2. Observe the OnOpen event fires, but not Opened, and the dropdown does not open, as expected.
  3. Click away from the dropdown (or click again on the dropdown, can reproduce either way).
  4. Observe the OnClose and Closed events fire, unexpected.

Expected Behavior

According to the documentation the Cancel property:

Gets or sets the whether the dropdown popup open action should be canceled or not

If we use OnOpen to cancel the "Open" action, we should never see the OnClose or Closed events.  Since the dropdown never opens, it should never get closed.

Root Cause

Even though e.Cancel prevents the dropdown from opening, it seems to set the internal state, so the dropdown "thinks" it is open, even though it's not.