mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #14230 from overleaf/td-review-panel-add-comment-reappear
React review panel: ensure that "Add comment" entry reappears after clicking away then back GitOrigin-RevId: fc1b656304d71876d8a4728648b73e1d3f873817
This commit is contained in:
parent
df393a3b9a
commit
5748ee4496
1 changed files with 5 additions and 0 deletions
|
@ -210,6 +210,10 @@ function PositionedEntries({
|
|||
const { reviewPanelOpen } = useLayoutContext()
|
||||
const previousLayoutInfoRef = useRef(initialLayoutInfo)
|
||||
|
||||
const resetLayout = () => {
|
||||
previousLayoutInfoRef.current = initialLayoutInfo
|
||||
}
|
||||
|
||||
const layout = (animate = true) => {
|
||||
const container = containerRef.current
|
||||
if (!container) {
|
||||
|
@ -273,6 +277,7 @@ function PositionedEntries({
|
|||
}
|
||||
|
||||
if (entryViews.length === 0) {
|
||||
resetLayout()
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue