Details
-
Bug
-
Resolution: Fixed
-
None
-
High
-
Spellcheck remained disabled for other tasks after opening one task where spellcheck was explicitly disabled with liveCheckOnEditing config.
-
Empty show more show less
Description
problem
- Open a task liveCheckOnEditing = 0
- Change to a task where liveCheckOnEditing = 1
- The spellcheck will still not work
reason
The reason for this behaviour is a logical bug in the spellcheck controller:
/*** * After task config load event handler. */ onEditorConfigLoaded:function(app, task){ var me=this, isPluginActive = app.getTaskConfig('plugins.SpellCheck.liveCheckOnEditing'); me.setActive(isPluginActive); },
- The above event handler is evaluating the tasks config.
- If liveCheckOnEditing in a task is disabled, this disables the whole controller
- After changing to another task - where liveCheckOnEditing is enabled - the event handler onEditorConfigLoaded is never called again since the whole controller is deactivated
Conclusion
deactivating of a controller is a useful way to disable a controller / feature but can not be controlled from inside the controller.
Solution
spellcheck disabling must be implemented via an internal deactivation flag instead of deactivating the whole controller