mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Prevent track-changes hotkey actions when not enabled.
This commit is contained in:
parent
670d4438dc
commit
9cc461605e
2 changed files with 6 additions and 0 deletions
|
@ -90,6 +90,8 @@ define [
|
|||
$scope.chat = {}
|
||||
|
||||
ide.toggleReviewPanel = $scope.toggleReviewPanel = () ->
|
||||
if !$scope.project.features.trackChangesVisible
|
||||
return
|
||||
$scope.ui.reviewPanelOpen = !$scope.ui.reviewPanelOpen
|
||||
event_tracking.sendMB "rp-toggle-panel", { value : $scope.ui.reviewPanelOpen }
|
||||
|
||||
|
|
|
@ -416,6 +416,8 @@ define [
|
|||
$scope.toggleReviewPanel()
|
||||
|
||||
$scope.addNewCommentFromKbdShortcut = () ->
|
||||
if !$scope.project.features.trackChangesVisible
|
||||
return
|
||||
$scope.$broadcast "comment:select_line"
|
||||
if !$scope.ui.reviewPanelOpen
|
||||
$scope.toggleReviewPanel()
|
||||
|
@ -575,6 +577,8 @@ define [
|
|||
$scope.openTrackChangesUpgradeModal()
|
||||
|
||||
$scope.toggleTrackChangesFromKbdShortcut = () ->
|
||||
if !$scope.project.features.trackChangesVisible
|
||||
return
|
||||
if $scope.editor.wantTrackChanges
|
||||
$scope.toggleTrackChanges false
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue