Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set editor.$blockScrolling = Infinity? #29

Closed
oluckyman opened this issue Aug 3, 2015 · 9 comments
Closed

How to set editor.$blockScrolling = Infinity? #29

oluckyman opened this issue Aug 3, 2015 · 9 comments

Comments

@oluckyman
Copy link

I’m 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?

@oluckyman oluckyman changed the title How to set editor.$blockScrolling = Infinity How to set editor.$blockScrolling = Infinity? Aug 3, 2015
@brokenalarms
Copy link
Contributor

please merge this fix by Evan, just came here to ask the same thing :) thanks!

@mingfang
Copy link

mingfang commented Mar 6, 2016

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?

@mskasal
Copy link

mskasal commented Jun 6, 2016

@mingfang Default value is 0. I tried to set as editor.$blockScrolling = 1 and console logs gone.

@mingfang
Copy link

mingfang commented Jun 6, 2016

@mskasal thanks

@loretoparisi
Copy link

@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;
        }

@harshapps
Copy link

@oluckyman @loretoparisi Try this. This worked for me.

var editor = ace.edit("editor");
editor.getSession().setMode("ace/mode/javascript");
editor.$blockScrolling = Infinity;

@KevinMongiello
Copy link

How does this work in jsx? <ReactAce $blockScrolling={<value>} /> doesn't work where value = Infinity, 1, "Infinity", etc.

@oluckyman
Copy link
Author

oluckyman commented Apr 22, 2017

@KevinMongiello try this:

<ReactAce
  editorProps={{
    $blockScrolling: Infinity
  }}
/>

@KevinMongiello
Copy link

ahh thanks :) @oluckyman

remo5000 added a commit to source-academy/frontend that referenced this issue Jul 6, 2018
Adding this infinity prop is part of an update we do not have yet (ace
editor) fxmontigny/ng2-ace-editor#11

Used a fix for react I found here: securingsincity/react-ace#29
remo5000 added a commit to source-academy/frontend that referenced this issue Jul 6, 2018
Adding this infinity prop is part of an update we do not have yet (ace
editor) fxmontigny/ng2-ace-editor#11

Used a fix for react I found here: securingsincity/react-ace#29
remo5000 added a commit to source-academy/frontend that referenced this issue Jul 6, 2018
Adding this infinity prop is part of an update we do not have yet (ace
editor) fxmontigny/ng2-ace-editor#11

Used a fix for react I found here: securingsincity/react-ace#29
ning-y pushed a commit to source-academy/frontend that referenced this issue Jul 6, 2018
* Fix #164

* Fix #153

* Fix #167

Adding this infinity prop is part of an update we do not have yet (ace
editor) fxmontigny/ng2-ace-editor#11

Used a fix for react I found here: securingsincity/react-ace#29

* Fix #172, #171, #168 using PureComponent

- Call scroll inside ReplInput instead of Repl
- Change components to PureComponents (thereby changing the update
condition)
- Remove throttle for onChange

Lack of unneccasry updates and proper scrolling mechanism fixed #168.

* Format files

* Update tests

* Move overflow to side-content-text

Also fixed a minor issue with padding disappearing, using fit-content.

* Remove text justification for markdown editor

I don't think markdown is justified, and so we shouln't be displaying it
in such a way either.

* Fix always-on scrollbars on X11

* Add overflow-y for card

* Fix side content header height

Also moved the css into the appropriate nested location.

* Format scss

* Bump version number 0.1.2 -> 0.1.3
jsmasterdev pushed a commit to jsmasterdev/cadey-react-academ that referenced this issue Nov 28, 2020
* Fix #164

* Fix #153

* Fix #167

Adding this infinity prop is part of an update we do not have yet (ace
editor) fxmontigny/ng2-ace-editor#11

Used a fix for react I found here: securingsincity/react-ace#29

* Fix #172, #171, #168 using PureComponent

- Call scroll inside ReplInput instead of Repl
- Change components to PureComponents (thereby changing the update
condition)
- Remove throttle for onChange

Lack of unneccasry updates and proper scrolling mechanism fixed #168.

* Format files

* Update tests

* Move overflow to side-content-text

Also fixed a minor issue with padding disappearing, using fit-content.

* Remove text justification for markdown editor

I don't think markdown is justified, and so we shouln't be displaying it
in such a way either.

* Fix always-on scrollbars on X11

* Add overflow-y for card

* Fix side content header height

Also moved the css into the appropriate nested location.

* Format scss

* Bump version number 0.1.2 -> 0.1.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants