fix missing view more? #687
This commit is contained in:
parent
d3fac7f968
commit
3a7d899ce7
|
@ -40,8 +40,17 @@ export default memo(function Text ({ nofollow, imgproxyUrls, children, tab, ...o
|
|||
const container = containerRef.current
|
||||
if (!container || overflowing) return
|
||||
|
||||
setOverflowing(container.scrollHeight > window.innerHeight * 2)
|
||||
}, [containerRef.current])
|
||||
function checkOverflow () {
|
||||
setOverflowing(container.scrollHeight > window.innerHeight * 2)
|
||||
}
|
||||
|
||||
window.addEventListener('resize', checkOverflow)
|
||||
checkOverflow()
|
||||
|
||||
return () => {
|
||||
window.removeEventListener('resize', checkOverflow)
|
||||
}
|
||||
}, [containerRef.current, setOverflowing])
|
||||
|
||||
// all the reactStringReplace calls are to facilitate search highlighting
|
||||
const slugger = useRef(new GithubSlugger())
|
||||
|
|
Loading…
Reference in New Issue