fix setAutoScrollEditorIntoView and use in demo page

This commit is contained in:
nightwing 2013-03-24 22:13:11 +04:00
commit 7f76f0b81c
3 changed files with 13 additions and 5 deletions

View file

@ -2136,7 +2136,7 @@ var Editor = function(renderer, session) {
* @param {Boolean} enable default true
**/
this.setAutoScrollEditorIntoView = function(enable) {
if (enable === true)
if (enable === false)
return;
var rect;
var self = this;
@ -2178,7 +2178,7 @@ var Editor = function(renderer, session) {
}
});
this.setAutoScrollEditorIntoView = function(enable) {
if (enable === false)
if (enable === true)
return;
delete this.setAutoScrollEditorIntoView;
this.removeEventListener("changeSelection", onChangeSelection);