diff --git a/source/Ox.UI/js/List/List.js b/source/Ox.UI/js/List/List.js index 55a92e89..f58f0c00 100644 --- a/source/Ox.UI/js/List/List.js +++ b/source/Ox.UI/js/List/List.js @@ -118,8 +118,7 @@ Ox.List = function(options, self) { updateSort(); } }) - .scroll(scroll), - touchSelection = []; + .scroll(scroll); self.options.sort = self.options.sort.map(function(sort) { return Ox.isString(sort) ? { @@ -144,10 +143,13 @@ Ox.List = function(options, self) { doubleclick: doubleclick }).on({ touchend: function(e) { - if(touchSelection.length && that.options('selected')[0] == touchSelection[0]) { + if ( + self.touchSelection.length + && self.options.selected[0] == self.touchSelection[0] + ) { doubleclick(e); } else { - touchSelection = Ox.clone(that.options('selected')); + self.touchSelection = Ox.clone(self.options.selected); } } @@ -210,7 +212,8 @@ Ox.List = function(options, self) { preview: false, requests: [], scrollTimeout: 0, - selected: [] + selected: [], + touchSelection: [] }); if (!self.isAsync) { self.selected = self.options.items.map(function(item, i) {