mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-10 07:02:03 +00:00
Merge pull request #14361 from overleaf/ii-add-comment-review-panel
[web] Open current file view mode when adding comment through editor widget GitOrigin-RevId: 7028ab2a2b6369064712d456c8ae1d33498b8002
This commit is contained in:
parent
b05f8ad7e7
commit
fc9d3755c2
1 changed files with 3 additions and 1 deletions
|
@ -23,7 +23,8 @@ function EditorWidgets() {
|
|||
handleShowBulkRejectDialog,
|
||||
handleConfirmDialog,
|
||||
} = useBulkActionsModal()
|
||||
const { setIsAddingComment } = useReviewPanelUpdaterFnsContext()
|
||||
const { setIsAddingComment, handleSetSubview } =
|
||||
useReviewPanelUpdaterFnsContext()
|
||||
const [addNewComment] =
|
||||
useScopeValue<(e: React.MouseEvent<HTMLButtonElement>) => void>(
|
||||
'addNewComment'
|
||||
|
@ -47,6 +48,7 @@ function EditorWidgets() {
|
|||
addNewComment(e)
|
||||
setTimeout(() => {
|
||||
// Re-render the comment box in order to add autofocus every time
|
||||
handleSetSubview('cur_file')
|
||||
setIsAddingComment(false)
|
||||
setIsAddingComment(true)
|
||||
}, 0)
|
||||
|
|
Loading…
Reference in a new issue