# ScrollTop/Bottom within a modal

**URL:** <https://forum.ionicframework.com/t/scrolltop-bottom-within-a-modal/3978>\
**Category:** uncategorized\
**Created:** [May 9, 2014, 12:34am UTC](https://forum.ionicframework.com/t/scrolltop-bottom-within-a-modal/3978 "2014-05-09T00:34:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pink\_tshirt](https://avatars.discourse-cdn.com/v4/letter/p/a698b9/32.png) [@pink\_tshirt](https://forum.ionicframework.com/u/pink_tshirt)\
**Post date:** [May 9, 2014, 12:34am UTC](https://forum.ionicframework.com/t/scrolltop-bottom-within-a-modal/3978/1 "2014-05-09T00:34:04Z")

</div>

Is there a way to use scrollTop or scrollBottom within a modal window with along list. If you just put `$ionicScrollDelegate.scrollTop(true)` it gets applied to the main view the modal window belongs to.

---

<div class="post-metadata">

**Author:** ![Calendee](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/calendee/32/13656_2.png) [@Calendee](https://forum.ionicframework.com/u/Calendee)\
**Post date:** [May 9, 2014, 8:01pm UTC](https://forum.ionicframework.com/t/scrolltop-bottom-within-a-modal/3978/2 "2014-05-09T20:01:45Z")

</div>

You need to use the `delegate-handle`.

```auto
<ion-content delegate-handle="modalContent" >

```

```auto
$ionicScrollDelegate.$getByHandle('modalContent').scrollTop(true);

```

See this example :

> **[Modal: 1.0.0-beta.4](https://codepen.io/calendee/pen/DfxFw)**
>
> Demo of an Ionc slide up modal. Forked from Ionic's Pen Modal: 1.0.0-beta.4. ...

FYI : Ideally, tapping on the modal’s header would cause the list in the modal to scrollTop automatically. I’ve opened Issue #1329 for this : [https://github.com/driftyco/ionic/issues/1329](https://github.com/driftyco/ionic/issues/1329)

---

<div class="post-metadata">

**Author:** ![Calendee](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/calendee/32/13656_2.png) [@Calendee](https://forum.ionicframework.com/u/Calendee)\
**Post date:** [May 12, 2014, 6:35pm UTC](https://forum.ionicframework.com/t/scrolltop-bottom-within-a-modal/3978/3 "2014-05-12T18:35:11Z")

</div>

FYI : This is fixed in the nightlies.
