I鈥檓 getting these warnings:
Automatically scrolling cursor into view after selection change this will be disabled in the next version set editor.$blockScrolling = Infinity to disable this message
Where should I set editor.$blockScrolling = Infinity to prevent these warnings?
please merge this fix by Evan, just came here to ask the same thing :) thanks!
I'm still getting these warnings in the console.
Sounds like it was fixed though.
Is there something I have to set to avoid the warnings?
@mingfang Default value is 0. I tried to set as editor.$blockScrolling = 1 and console logs gone.
@mskasal thanks
@mskasal I did but this does not solve the issue:
this.editor = this._createEditor("editor");
this.editor.$blockScrolling = 1;
this.editor.setOptions({
readOnly: true,
highlightActiveLine: false,
highlightGutterLine: false,
onLoad: function (_editor) {
// This is to remove following warning message on console:
// Automatically scrolling cursor into view after selection change this will be disabled in the next version
// set editor.$blockScrolling = Infinity to disable this message
_editor.$blockScrolling = 1
}
});
where
private _createEditor(element_name:string,onchange?:any){
var editor:Editor = ace.edit(element_name);
//editor.setTheme('ace/theme/monokai');
editor.getSession().setMode('ace/mode/javascript');
editor.getSession().setTabSize(4);
editor.getSession().setUseSoftTabs(false);
editor.getSession().setUseWrapMode(true);
editor.setShowPrintMargin(true);
return editor;
}
@oluckyman @loretoparisi Try this. This worked for me.
var editor = ace.edit("editor");
editor.getSession().setMode("ace/mode/javascript");
editor.$blockScrolling = Infinity;
How does this work in jsx? <ReactAce $blockScrolling={<value>} /> doesn't work where value = Infinity, 1, "Infinity", etc.
@KevinMongiello try this:
<ReactAce
editorProps={{
$blockScrolling: Infinity
}}
/>
ahh thanks :) @oluckyman
Most helpful comment
@KevinMongiello try this: