mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
optimise common case for closing context menu (triggered on scroll)
This commit is contained in:
parent
e62a2c7a6f
commit
5244fddce2
1 changed files with 5 additions and 2 deletions
|
@ -86,6 +86,9 @@ define [
|
||||||
return false
|
return false
|
||||||
|
|
||||||
closeContextMenu: (e) ->
|
closeContextMenu: (e) ->
|
||||||
|
# this is triggered on scroll, so for performance only apply
|
||||||
|
# setting when it changes
|
||||||
|
if @$scope?.spellingMenu?.open != false
|
||||||
@$scope.$apply () =>
|
@$scope.$apply () =>
|
||||||
@$scope.spellingMenu.open = false
|
@$scope.spellingMenu.open = false
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue