FIX: Clamp last read position to height of the widget

This commit is contained in:
Robin Ward 2016-12-21 14:24:15 -05:00
parent 783490f763
commit e85904b98f

View File

@ -25,7 +25,9 @@ createWidget('timeline-last-read', {
tagName: 'div.timeline-last-read',
buildAttributes(attrs) {
return { style: `height: 40px; top: ${attrs.top}px` };
const bottom = SCROLLAREA_HEIGHT - 10;
const top = attrs.top > bottom ? bottom : attrs.top;
return { style: `height: 20px; top: ${top}px` };
},
html(attrs) {