mirror of
https://github.com/discourse/discourse.git
synced 2025-03-31 02:35:58 +08:00
FIX: Clamp last read position to height of the widget
This commit is contained in:
parent
783490f763
commit
e85904b98f
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user