Splitters sometimes sticks to the mouse cursor even when you release the left mouse button.
if you try on example on Blazor Splitter component. Try on Pan B7
It's strange that support team ignored this issue. Splitter sticking does happen quite often. In some cases, the sticking is so strong that it is not always possible to get rid of this.
For some reason, this defect never appears on the site with examples (Blazor Splitter Component | Free UI Components by Radzen). But if you copy this code into an empty project, the defect is reproducible stably.
I had to look the source code to fix this problem. And here's how I solved it. In the Radzen.Blazor.js script file, in the "startSplitterResize" function, you need to add an additional check in the "mouseMoveHandler" handler:
if (e.buttons === 0) {
Radzen[el].mouseUpHandler(e);
return;
}
Here's what the handler looks like in its entirety:
mouseMoveHandler: function(e) {
if (Radzen[el]) {
if (e.buttons === 0) { // Checking if the mouse button is already released
Radzen[el].mouseUpHandler(e);
return;
}
splitter.invokeMethodAsync(
'RadzenSplitter.OnPaneResizing'
);
var spacePerc = Radzen[el].panePerc + Radzen[el].paneNextPerc;
var spaceLength = Radzen[el].paneLength + Radzen[el].paneNextLength;
var length = (Radzen[el].paneLength -
(isHOrientation && Radzen.isRTL(e.target) ? -1 : 1) * (Radzen[el].clientPos - (isHOrientation ? e.clientX : e.clientY)));
if (length > spaceLength)
length = spaceLength;
if (minValue && length < minValue) length = minValue;
if (maxValue && length > maxValue) length = maxValue;
if (paneNext) {
var nextSpace=spaceLength-length;
if (minNextValue && nextSpace < minNextValue) length = spaceLength-minNextValue;
if (maxNextValue && nextSpace > maxNextValue) length = spaceLength+maxNextValue;
}
var perc = length / Radzen[el].paneLength;
if (!isFinite(perc)) {
perc = 1;
Radzen[el].panePerc = 0.1;
Radzen[el].paneLength =isHOrientation
? pane.getBoundingClientRect().width
: pane.getBoundingClientRect().height;
}
var newPerc = Radzen[el].panePerc * perc;
if (newPerc < 0) newPerc = 0;
if (newPerc > 100) newPerc = 100;
pane.style.flexBasis = newPerc + '%';
if (paneNext)
paneNext.style.flexBasis = (spacePerc - newPerc) + '%';
}
},
I hope that technical support will not ignore this problem a second time and will add this checking to their next release.
Otherwise, it will be very inconvenient, since now I have to connect the modified Radzen.Blazor.js script file locally, replacing the link in the _Host.cshtml file.
Hey @AlexanderKulikov,
We accept pull requests! The splitter component itself is submitted as pull request as well, on the other hand if you are looking for dedicated support feel free to check our pricing page.