Skip to content

Commit

Permalink
#4
Browse files Browse the repository at this point in the history
  • Loading branch information
scniro committed Aug 2, 2017
1 parent 94f8d2d commit d18c52a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/app.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ var CodeMirror = function (_React$Component) {

if (!this.props.resetCursorOnSet) {

this.props.autoScrollCursorOnSet ? this.editor.setCursor(this.cursorPos, null, { scroll: false }) : this.editor.setCursor(this.cursorPos);
!this.props.autoScrollCursorOnSet && this.props.autoScrollCursorOnSet !== undefined ? this.editor.setCursor(this.cursorPos, null, { scroll: false }) : this.editor.setCursor(this.cursorPos);
}
}
}, {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-codemirror2",
"version": "0.0.11",
"version": "0.0.12",
"description": "a tiny react codemirror component wrapper",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 3 additions & 1 deletion src/react-codemirror2.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,10 @@ export default class CodeMirror extends React.Component {

if (!this.props.resetCursorOnSet) {

this.props.autoScrollCursorOnSet ?
!this.props.autoScrollCursorOnSet && this.props.autoScrollCursorOnSet !== undefined ?
this.editor.setCursor(this.cursorPos, null, {scroll: false}) : this.editor.setCursor(this.cursorPos);


}
}

Expand Down

0 comments on commit d18c52a

Please sign in to comment.