Skip to content

Commit

Permalink
[EuiCodeEditor] Set $blockScrolling = Infinity to prevent console war…
Browse files Browse the repository at this point in the history
…ning (#940)

* 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"

* Adding CHANGELOG entry

* Changing CHANGELOG entry
  • Loading branch information
ycombinator authored Jun 21, 2018
1 parent 8f8293b commit 7eeea13
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
- `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)

Expand Down
3 changes: 3 additions & 0 deletions src/components/code_editor/code_editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ export class EuiCodeEditor extends Component {
onFocus={this.onFocusAce}
onBlur={this.onBlurAce}
setOptions={options}
editorProps={{
$blockScrolling: Infinity
}}
cursorStart={filteredCursorStart}
{...rest}
/>
Expand Down

0 comments on commit 7eeea13

Please sign in to comment.