Reset preview scroll position when post item is clicked

When scrolling through the preview of a long article, if the post was changed the scroll position of the preview would remain the same.

![ghostpreview](https://cloud.githubusercontent.com/assets/846587/3964791/7eb248d2-278d-11e4-80ce-6da126080df5.gif)

No, sorry, I meant why aren't you using the `{{action}}` ember helper =)
 Just trying to keep jQuery down to a minimum


On Tue, Aug 19, 2014 at 10:08 AM, Robert Rhoades <notifications@github.com>
wrote:

> In core/client/views/posts.js:
>
> > @@ -15,6 +15,11 @@ var PostsView = Ember.View.extend({
> >                  }
> >              });
> >
> > +            // ### Reset the content preview scroll when post item is clicked
> > +            $('.manage').on('click', '.content-list ol li', function () {
> > +                self.send('resetPreviewScrollPosition');
>
> Good question, I may be misunderstanding but I presume you are referring
> to attaching the event handler to the li elements?
>
> I could but I'd be attaching a new event handler to each li which incurs a
> small but noticeable performance cost.
>
> This uses event delegation and reduces the attached events by attach the
> event higher up the DOM and using event.target. I could probably optimise
> this further by attaching it to the ul rather than the body though
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/TryGhost/Ghost/pull/3819/files#r16424888>.
>