Skip to content

Commit eff205e

Browse files
committed
Fix scope for overriden autocomplete.getModel() function.
1 parent a30ed0d commit eff205e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

plugin.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ CKEDITOR.plugins.add('scayt', {
3131

3232
CKEDITOR.plugins.autocomplete.prototype.getModel = function(arg1) {
3333
var editor = this.editor,
34-
model = originalFn(arg1);
34+
geModelFn = originalFn.bind(this),
35+
model = geModelFn(arg1);
3536

3637
model.on('change-isActive', function(evt) {
3738
evt.data ? editor.fire('autocompletePanelShow') : editor.fire('autocompletePanelHide');
@@ -2057,4 +2058,4 @@ CKEDITOR.on('scaytReady', function() {
20572058
*
20582059
* @cfg {String} [scayt_elementsToIgnore='style']
20592060
* @member CKEDITOR.config
2060-
*/
2061+
*/

0 commit comments

Comments
 (0)