Browser is stuck and Memory keeps raising after typing in editor
Problem
set maxLines as 1 or 2, with onLoad set wrap mode as true at the same time, click before the last curly brace and type Enter button to make the editor formatting automatically, you will find the browser stuck and the memory raising.
Sample code to reproduce your issue
<AceEditor
mode="json" maxLines={2} value={"{\"a\":\"b\"}"}
onLoad={editor => editor.getSession().setUseWrapMode(true)}
/>
or visit the simple project react-ace-editor-issuse
References
Initial memory and CPU
10 sec after type Enter button

Progress on: # Win 10 / Chrome 58&IE 11/ React 15.6.1
We considered moving away from https://github.com/JedWatson/react-codemirror because at least at the moment it is not maintained well (aka the maintainer does not merge or reacts to PRs) but this here is a blocker that stops that.
@SecMao I'm unable to reproduce on my mac. I'll need to find a Windows laptop to reproduce.
@inoas were you able to reproduce this issue? I see a few comments mentioning that you were looking to switch from codemirror but it's unclear if you saw these issues locally.
We haven't made the move just yet and will try to reproduce this if we do and report back in either case (no leak or "looks like" leak)
i am using React v16.4, react-ace v6.1.2
- setup with
create-react-app - and test with code below, setting AceEditor with
maxLinesandwrapEnabled
class App extends React.Component {
render() {
const props = {
mode: 'javascript',
theme: 'monokai',
value: 'const test = \'hello loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong text\'',
maxLines: 1,
wrapEnabled: true,
};
return (
<div>
<AceEditor {...props} />
</div>
);
}
}
and it will cause cpu and memory raising

@securingsincity This issue is also reproducible in Ubuntu 16.
@malavshah9 are you seeing this with the current version of react-ace? this used to happen with the older version, which was using the old version of ace, which had this bug, but it is fixed on ace version 1.4.12