mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-13 21:53:43 +01:00
optimise common case for closing context menu (triggered on scroll)
This commit is contained in:
+5
-2
@@ -86,8 +86,11 @@ define [
|
||||
return false
|
||||
|
||||
closeContextMenu: (e) ->
|
||||
@$scope.$apply () =>
|
||||
@$scope.spellingMenu.open = false
|
||||
# this is triggered on scroll, so for performance only apply
|
||||
# setting when it changes
|
||||
if @$scope?.spellingMenu?.open != false
|
||||
@$scope.$apply () =>
|
||||
@$scope.spellingMenu.open = false
|
||||
|
||||
replaceWord: (highlight, text) ->
|
||||
@editor.getSession().replace(new Range(
|
||||
|
||||
Reference in New Issue
Block a user