diff --git a/source/Ox.UI/js/Video/Ox.AnnotationPanel.js b/source/Ox.UI/js/Video/Ox.AnnotationPanel.js index 7b6fe61d..94d45782 100644 --- a/source/Ox.UI/js/Video/Ox.AnnotationPanel.js +++ b/source/Ox.UI/js/Video/Ox.AnnotationPanel.js @@ -156,7 +156,7 @@ Ox.AnnotationPanel = function(options, self) { }) ); - self.options.selected && scrollToSelected( + self.options.selected && getFolder(self.options.selected) && scrollToSelected( getFolder(self.options.selected).options('type') ); @@ -382,7 +382,7 @@ Ox.AnnotationPanel = function(options, self) { function scrollToSelected(type) { var $item = that.find('.OxEditableElement.OxSelected'), itemHeight = $item.height() + (type == 'text' ? 8 : 0), - itemTop = $item.offset().top, + itemTop = ($item.offset() || {}).top, itemBottom = itemTop + itemHeight, height = self.$folders.height(), scrollTop = self.$folders.scrollTop(),