Skip to content

Commit 823eae9

Browse files
Merge pull request #47 from tannermeans/master
Allow devs to set an initial value without triggering a change event
2 parents fd1748f + 6484aa9 commit 823eae9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/ace.jsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,14 @@ module.exports = React.createClass({
7171
this.editor.getSession().setMode('ace/mode/' + this.props.mode);
7272
this.editor.setTheme('ace/theme/' + this.props.theme);
7373
this.editor.setFontSize(this.props.fontSize);
74-
this.editor.on('change', this.onChange);
75-
this.editor.on('paste', this.onPaste);
7674
this.editor.setValue(this.props.value, this.props.cursorStart);
7775
this.editor.renderer.setShowGutter(this.props.showGutter);
7876
this.editor.setOption('maxLines', this.props.maxLines);
7977
this.editor.setOption('readOnly', this.props.readOnly);
8078
this.editor.setOption('highlightActiveLine', this.props.highlightActiveLine);
8179
this.editor.setShowPrintMargin(this.props.setShowPrintMargin);
8280
this.editor.on('change', this.onChange);
81+
this.editor.on('paste', this.onPaste);
8382

8483
if (this.props.onLoad) {
8584
this.props.onLoad(this.editor);

0 commit comments

Comments
 (0)