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

setValue() emits $blockScrolling = Infinity warning #2499

Closed
bazineta opened this issue May 17, 2015 · 4 comments
Closed

setValue() emits $blockScrolling = Infinity warning #2499

bazineta opened this issue May 17, 2015 · 4 comments

Comments

@bazineta
Copy link

When using setValue(), the following warning is issued:

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'm a bit confused as to what this is trying to tell me, as I'm calling a documented API, and it's in turn telling me to call an undocumented one.

shaban added a commit to shaban/DefinitelyTyped that referenced this issue Jun 21, 2015
add config functions, reference https://github.com/ajaxorg/ace/wiki/Configuring-Ace
also support $blockscrolling variable; reference ajaxorg/ace#2499
mcast added a commit to mcast/rust-playpen that referenced this issue Jul 18, 2015
  "Automatically scrolling cursor into view after selection change"
  "this will be disabled in the next version"
  "set editor.$blockScrolling = Infinity to disable this message"

cf. ajaxorg/ace#2499

> [...]  I'm calling a documented API, and it's in turn
> telling me to call an undocumented one.

and angular-ui/ui-ace#104
@dwelle
Copy link

dwelle commented Sep 2, 2015

I'm also interested in why it's being deprecated.

respeccing pushed a commit to respeccing/rust-playpen that referenced this issue Apr 3, 2016
  "Automatically scrolling cursor into view after selection change"
  "this will be disabled in the next version"
  "set editor.$blockScrolling = Infinity to disable this message"

cf. ajaxorg/ace#2499

> [...]  I'm calling a documented API, and it's in turn
> telling me to call an undocumented one.

and angular-ui/ui-ace#104
@gordonwoodhull
Copy link

gordonwoodhull commented May 5, 2016

For the curious, this seems to be the commit where it was deprecated: 8c1aa5c.

Unclear, but I think I saw hints that it is getting replaced with another feature.

(We use this feature, but we have to monkey patch our own calculations because (horrors) we are doing the parent-scroll thing.)

rmzelle added a commit to citation-style-language/csl-validator that referenced this issue Aug 5, 2016
Sticking with Ace 1.1.8 for now because later versions give a funky,
poorly documented console warning
(ajaxorg/ace#2499)
@jaschaio
Copy link

I am having the same problem, using setValue() shows the same error message to me, even if $blockscrolling = Infinity is set.

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

            // Initiate ACE Editor
            var textarea = $(this);
            var mode = textarea.data('editor');
            var editDiv = $('<div>', {
                position: 'absolute',
                width: '100%',
                height: textarea.height(),
                'class': textarea.attr('class')
            }).insertBefore(textarea);
            textarea.css('display', 'none');
            var editor = ace.edit(editDiv[0]);
            editor.getSession().setValue(textarea.val());
            editor.getSession().setMode("ace/mode/" + mode);
            editor.setTheme("ace/theme/chrome");
            editor.setOptions({
                autoScrollEditorIntoView: false,
                wrapBehavioursEnabled: false,
                showLineNumbers: true,
            });
            editor.$blockScrolling = Infinity;

            // Copy ACE Editor Content into Textarea and trigger Change
            editor.getSession().on('change', function () {
                textarea.val(editor.getSession().getValue());
                textarea.trigger('change');
            });

            textarea.val( editor.getSession().getValue());

If I uncomment the editor.getSession().setValue(textarea.val()); line, no error message is showing.

@nightwing
Copy link
Member

This warning was removed several versions ago

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

5 participants