mirror of https://github.com/sgoudham/carbon.git
fix cursor jumping at the end after every editor update
parent
497188aa1a
commit
4cfbb8f3d1
@ -1,6 +1,6 @@
|
|||||||
// For SSR, CodeMirror will throw an error, so return a div instead
|
// For SSR, CodeMirror will throw an error, so return a div instead
|
||||||
let CodeMirror = 'div'
|
let CodeMirror = 'div'
|
||||||
if (typeof window !== 'undefined' && typeof window.navigator !== 'undefined') {
|
if (typeof window !== 'undefined' && typeof window.navigator !== 'undefined') {
|
||||||
CodeMirror = require('react-codemirror2').UnControlled
|
CodeMirror = require('react-codemirror2').Controlled
|
||||||
}
|
}
|
||||||
export default CodeMirror
|
export default CodeMirror
|
||||||
|
Loading…
Reference in New Issue