# PreserveVisual doesn't appear to work with nested lists

**URL:** <https://forums.fusetools.com/t/preservevisual-doesnt-appear-to-work-with-nested-lists/6291>\
**Category:** Bug Reports\
**Created:** [April 2, 2017, 8:40am UTC](https://forums.fusetools.com/t/preservevisual-doesnt-appear-to-work-with-nested-lists/6291 "2017-04-02T08:40:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sebastian](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/sebastian/32/594_2.png) [@sebastian](https://forums.fusetools.com/u/sebastian)\
**Post date:** [April 2, 2017, 8:40am UTC](https://forums.fusetools.com/t/preservevisual-doesnt-appear-to-work-with-nested-lists/6291/1 "2017-04-02T08:40:02Z")

</div>

Fuse 0.35.0 (build 10867)  
Tested in preview on MacOS and on iOS

> **[jhsware/fuse-infinite-scroll](https://github.com/jhsware/fuse-infinite-scroll)**
>
> fuse-infinite-scroll - Infinite scroll using UX-expression y(element) introduced in Fusetools 0.35

First I render the initial list, then (after 2000ms to make it obvious) I insert some rows to the top of the list to allow scrolling up and scroll triggers to activate.

I would expect the scroll position to remain the same, but it moves.

---

<div class="post-metadata">

**Author:** ![sebastian](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/sebastian/32/594_2.png) [@sebastian](https://forums.fusetools.com/u/sebastian)\
**Post date:** [May 13, 2017, 9:01am UTC](https://forums.fusetools.com/t/preservevisual-doesnt-appear-to-work-with-nested-lists/6291/2 "2017-05-13T09:01:33Z")

</div>

This is still an issue with the latest release and a blocker for me to release improved sticky header using PreserveVisual and expressions.

Preview:  
Fuse 0.37.0 (build 12471)

iOS build:  
Uno 1.0.7 (build 5323) OS X 10.12 i386 341576c

When playing around it appears that the bug only manifests itself when adding sub items to the sticky header container currently at the top of the page.

---

<div class="post-metadata">

**Author:** ![edA-qa\_mort-ora-y](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/eda-qa_mort-ora-y/32/124_2.png) [@edA-qa\_mort-ora-y](https://forums.fusetools.com/u/edA-qa_mort-ora-y)\
**Post date:** [May 22, 2017, 8:40am UTC](https://forums.fusetools.com/t/preservevisual-doesnt-appear-to-work-with-nested-lists/6291/3 "2017-05-22T08:40:04Z")

</div>

`PreserveVisual` only considers the positions and sizes of the elements inside the `StackPanel`, not of their children. It chooses a fixed element depending on the alignment of the StackPanel (default to Top in this case). It takes the one positioned closed to the anchoring location.

There’s not yet a way to influence this selection, or preservation process, unfortunately.

---

<div class="post-metadata">

**Author:** ![sebastian](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/sebastian/32/594_2.png) [@sebastian](https://forums.fusetools.com/u/sebastian)\
**Post date:** [May 22, 2017, 9:12am UTC](https://forums.fusetools.com/t/preservevisual-doesnt-appear-to-work-with-nested-lists/6291/4 "2017-05-22T09:12:54Z")

</div>

I will look into how I can flatten the list. The tricky part is figuring out the height of the content when there are multiple items with each sticky header.
