Browse Source

Merge branch 'master' into feature/effectiveviewportchanged

pull/4173/head
Dariusz Komosiński 6 years ago
committed by GitHub
parent
commit
4ec63d9db6
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/Avalonia.Controls/Repeater/ViewportManager.cs

7
src/Avalonia.Controls/Repeater/ViewportManager.cs

@ -344,6 +344,11 @@ namespace Avalonia.Controls
// Note that the element being brought into view could be a descendant.
var targetChild = GetImmediateChildOfRepeater((IControl)args.TargetObject);
if (targetChild is null)
{
return;
}
// Make sure that only the target child can be the anchor during the bring into view operation.
foreach (var child in _owner.Children)
{
@ -377,7 +382,7 @@ namespace Avalonia.Controls
if (parent == null)
{
throw new InvalidOperationException("OnBringIntoViewRequested called with args.target element not under the ItemsRepeater that recieved the call");
return null;
}
return targetChild;

Loading…
Cancel
Save