mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 06:03:45 +01:00
Merge pull request #1111 from sharelatex/as-fix-spell-check
Fix bug where read only editor would crash GitOrigin-RevId: ed8ac8ddcec118b57e20916afaddb50d5062b2cf
This commit is contained in:
committed by
sharelatex
parent
659242b457
commit
221acb8207
@@ -594,6 +594,7 @@ define([
|
||||
}
|
||||
|
||||
const initSpellCheck = function() {
|
||||
if (!spellCheckManager) return
|
||||
spellCheckManager.init()
|
||||
editor.on('changeSession', onSessionChangeForSpellCheck)
|
||||
onSessionChangeForSpellCheck({ session: editor.getSession() }) // Force initial setup
|
||||
@@ -601,6 +602,7 @@ define([
|
||||
}
|
||||
|
||||
const tearDownSpellCheck = function() {
|
||||
if (!spellCheckManager) return
|
||||
editor.off('changeSession', onSessionChangeForSpellCheck)
|
||||
return editor.off(
|
||||
'nativecontextmenu',
|
||||
|
||||
Reference in New Issue
Block a user