From 3cb2cd2dd251851c705b56153cd2e1ca52574f32 Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Thu, 21 Jun 2018 02:05:18 -0700 Subject: [PATCH 1/3] Set $blockScrolling = Infinity to prevent console warning Without this change, this warning is shown in the 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" --- src/components/code_editor/code_editor.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/code_editor/code_editor.js b/src/components/code_editor/code_editor.js index 1b469c6b99a..e9eae5fc852 100644 --- a/src/components/code_editor/code_editor.js +++ b/src/components/code_editor/code_editor.js @@ -175,6 +175,9 @@ export class EuiCodeEditor extends Component { onFocus={this.onFocusAce} onBlur={this.onBlurAce} setOptions={options} + editorProps={{ + $blockScrolling: Infinity + }} cursorStart={filteredCursorStart} {...rest} /> From 31ebc48a35c97a0ce16ec26afb19afe01a564fea Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Thu, 21 Jun 2018 09:23:39 -0700 Subject: [PATCH 2/3] Adding CHANGELOG entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90ee58bb308..010ae166185 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ - Added `getPopoverScreenCoordinates` service function for positioining popover/tooltip content, updated `EuiToolTip` to use it ([#924](https://github.com/elastic/eui/pull/924)) - Allow `mode` prop in `EuiCodeEditor` to take custom mode object ([#935](https://github.com/elastic/eui/pull/935)) - `EuiCodeEditor` is now decorated with a `data-test-subj` selector (`codeEditorContainer`) ([#939](https://github.com/elastic/eui/pull/939)) +- Using `EuiCodeEditor` will no longer show a console warning ([#940](https://github.com/elastic/eui/pull/940)) ## [`0.0.54`](https://github.com/elastic/eui/tree/v0.0.54) From 49e39fe3ff74b42827c32883330eb5699f0007ff Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Thu, 21 Jun 2018 09:55:09 -0700 Subject: [PATCH 3/3] Changing CHANGELOG entry --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 010ae166185..ee0adeac62f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ - Added `getPopoverScreenCoordinates` service function for positioining popover/tooltip content, updated `EuiToolTip` to use it ([#924](https://github.com/elastic/eui/pull/924)) - Allow `mode` prop in `EuiCodeEditor` to take custom mode object ([#935](https://github.com/elastic/eui/pull/935)) - `EuiCodeEditor` is now decorated with a `data-test-subj` selector (`codeEditorContainer`) ([#939](https://github.com/elastic/eui/pull/939)) -- Using `EuiCodeEditor` will no longer show a console warning ([#940](https://github.com/elastic/eui/pull/940)) +- `EuiCodeEditor` no longer automatically scrolls cursor into view on selection change ([#940](https://github.com/elastic/eui/pull/940)) ## [`0.0.54`](https://github.com/elastic/eui/tree/v0.0.54)