fix doubleclick-to-scroll-to-top in list view

This commit is contained in:
rlx 2016-01-21 12:52:32 +05:30
parent c7515517da
commit 46852d9e4d

View file

@ -50,7 +50,13 @@ pandora.ui.toolbar = function() {
(!ui.item ? pandora.$ui.listTitle : pandora.$ui.itemTitle).bindEvent({
doubleclick: function() {
if (!ui.item) {
pandora.$ui.list && pandora.$ui.list.animate({scrollTop: 0}, 250);
pandora.$ui.list && (
ui.listView == 'list'
? pandora.$ui.list.$body
: pandora.$ui.list
).animate({
scrollTop: 0
}, 250);
} else {
pandora.$ui.browser.scrollToSelection();
}