mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05: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:
parent
659242b457
commit
221acb8207
1 changed files with 2 additions and 0 deletions
|
@ -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',
|
||||
|
|
Loading…
Reference in a new issue