This commit is contained in:
nightwing 2013-09-07 13:47:52 +04:00
commit 7b80bb793e
4 changed files with 15 additions and 6 deletions

View file

@ -90,7 +90,7 @@ var Autocomplete = function() {
this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler);
this.editor.off("changeSelection", this.changeListener);
this.editor.off("blur", this.changeListener);
this.editor.off("mousedown", this.changeListener);
this.editor.off("mousedown", this.mousedownListener);
this.editor.off("mousewheel", this.mousewheelListener);
this.changeTimer.cancel();

View file

@ -217,8 +217,11 @@ var optionsProvider = {
if (this["$" + name] === value)
return;
var opt = this.$options[name];
if (!opt)
if (!opt) {
if (typeof console != "undefined" && console.error)
console.error('misspelled option "' + name + '"');
return undefined;
}
if (opt.forwardTo)
return this[opt.forwardTo] && this[opt.forwardTo].setOption(name, value);
@ -229,8 +232,11 @@ var optionsProvider = {
},
getOption: function(name) {
var opt = this.$options[name];
if (!opt)
if (!opt) {
if (typeof console != "undefined" && console.error)
console.error('misspelled option "' + name + '"');
return undefined;
}
if (opt.forwardTo)
return this[opt.forwardTo] && this[opt.forwardTo].getOption(name);
return opt && opt.get ? opt.get.call(this) : this["$" + name];