Skip to content

fix: OnResize event callback of MultiSplitter #2321

@emetrix

Description

@emetrix

🐛 Bug Report

It seems the OnResize event callback of MultiSplitter is called each time a mouse click on the "resize bar" is performed - even if the panes / "resize bar" is not moved / resized at all.

💻 Repro or Code Sample

It can easily be reproduced on the demo site https://www.fluentui-blazor.net/MultiSplitter by performing a click on the MultiSplitter bar without moving the mouse / bar and check the console log at the right side of the page

🤔 Expected Behavior

The OnResize event should only be raised when the bar is really moved / resized.

😯 Current Behavior

The OnResize event is raised even when the bar / panes are not resized.

💁 Possible Solution

🔦 Context

In my case I have to handle the panes' sizes in pixels not in percentages. This works in general but due to the described behaviour the resize event where I have to recalculate the percentage size to pixels makes the pane resize even if it shouldn't.
I think it's based by the transformation from percentage to pixels which is not needed if the position of the "resize bar" has not been changed.

🌍 Your Environment

  • OS & Device: Windows 11 on PC
  • Browser: Microsoft Edge
  • .NET and Fluent UI Blazor library Version: 8.0.3 and 4.8.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions