angular-ui / ui-ace

This directive allows you to add ACE editor elements.
http://angular-ui.github.io/ui-ace
MIT License
578 stars 172 forks source link

Automatically scrolling cursor into view after selection change this will be disabled in the next version set editor.$blockScrolling = Infinity to disable this message #104

Open elgs opened 9 years ago

elgs commented 9 years ago

After upgraded to version 1.1.9. The console started be polluted by this message:

Automatically scrolling cursor into view after selection change this will be disabled in the next version set editor.$blockScrolling = Infinity to disable this message

I have a lot of ui-ace editors, most of them don't have any onLoad. Can you take them away? Thanks.

ajmajma commented 9 years ago

Having this issue as well.

wdxiake commented 9 years ago

Just add acee.$blockScrolling = Infinity; after line 148. These warnings will stop.

elgs commented 9 years ago

Thanks @wdxiake, but line 148 of which file?

kristw commented 9 years ago

ui-ace.js

kristw commented 9 years ago

I just create a pull request for this https://github.com/angular-ui/ui-ace/pull/111

Shipow commented 9 years ago

+1

JumpLink commented 9 years ago

+1

jdolan commented 9 years ago

:+1:

brettstack commented 9 years ago

+1

akuznetsov-gridgain commented 9 years ago

+1 Please add support for specifying "$blockScrolling = Infinity" via advanced options.

runninghare commented 9 years ago

You can also specify $blockScrolling = true in the onLoad callback function:

            _ctrl.aceEditorOptions = {
                useWrapMode: true,
                mode: 'css',
                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 = Infinity;
                }
            };
lianyi commented 8 years ago

+1

jazzfog commented 8 years ago

+1

Antwnis commented 8 years ago

Can you please approve this change-request ? It's so small and yet fixes a particular log-pollution issue

Thanks 👍

harshapps commented 8 years ago

@elgs Try this. This will remove the warning.

var editor = ace.edit("editor");

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

palmkevin commented 7 years ago

Thank you @harshapps Your solution is exactly what I was looking for!

adamtaylor13 commented 5 years ago

Can anyone elaborate this error means?