Skip to content

Commit 12201c9

Browse files
IacopoSbIacopo Sbalchiero
authored andcommitted
fix: scroll sync works with keyboard and scrollbar (again)
1 parent 0491b1f commit 12201c9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Views/MergeConflictEditor.axaml.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -833,8 +833,9 @@ protected override void OnOpened(EventArgs e)
833833
_resultPopup = this.FindControl<Border>("ResultPopup");
834834
_resultUndoPopup = this.FindControl<Border>("ResultUndoPopup");
835835

836-
// Set up scroll synchronization
837-
SetupScrollSync();
836+
// Defer scroll sync setup to ensure ScrollViewers are available in the visual tree
837+
Avalonia.Threading.Dispatcher.UIThread.Post(SetupScrollSync,
838+
Avalonia.Threading.DispatcherPriority.Loaded);
838839

839840
if (DataContext is ViewModels.MergeConflictEditor vm)
840841
{

0 commit comments

Comments
 (0)