Skip to content

Commit 7c7a697

Browse files
authored
🐛 fix loss of focus on parameters set with rerender (#40)
1 parent 9f9d391 commit 7c7a697

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Spillgebees.Blazor.RichTextEditor/Components/BaseRichTextEditor.razor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,8 @@ protected override async Task OnParametersSetAsync()
263263
}
264264

265265
if (Selection is not null
266-
&& Selection.Equals(InternalSelection)
267-
|| InternalSelection is null)
266+
&& Selection.Length != InternalSelection?.Length
267+
&& Selection.Index != InternalSelection?.Index)
268268
{
269269
InternalSelection = Selection;
270270
await SetSelectionAsync(InternalSelection);

0 commit comments

Comments
 (0)