From 22b6a4a2bfec1985ceee1e262dd95e34439bb13d Mon Sep 17 00:00:00 2001 From: orangemug Date: Wed, 16 Oct 2019 06:46:30 +0100 Subject: [PATCH] Added max-width to allow overfow scroll on JSONEditor --- src/components/layers/JSONEditor.jsx | 5 ++++- src/styles/_codemirror.scss | 3 +++ src/styles/_react-codemirror.scss | 3 --- src/styles/index.scss | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 src/styles/_codemirror.scss delete mode 100644 src/styles/_react-codemirror.scss diff --git a/src/components/layers/JSONEditor.jsx b/src/components/layers/JSONEditor.jsx index 466c8652..310ed137 100644 --- a/src/components/layers/JSONEditor.jsx +++ b/src/components/layers/JSONEditor.jsx @@ -115,7 +115,10 @@ class JSONEditor extends React.Component { scrollbarStyle: "null", } - return
this._el = el} /> + return
this._el = el} + /> } } diff --git a/src/styles/_codemirror.scss b/src/styles/_codemirror.scss new file mode 100644 index 00000000..85d7aa84 --- /dev/null +++ b/src/styles/_codemirror.scss @@ -0,0 +1,3 @@ +.codemirror-container { + max-width: 100%; +} diff --git a/src/styles/_react-codemirror.scss b/src/styles/_react-codemirror.scss deleted file mode 100644 index c054ca2f..00000000 --- a/src/styles/_react-codemirror.scss +++ /dev/null @@ -1,3 +0,0 @@ -.react-codemirror2 { - max-width: 100%; -} diff --git a/src/styles/index.scss b/src/styles/index.scss index b27341de..bfef57f0 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -38,7 +38,7 @@ $toolbar-offset: 0; @import 'popup'; @import 'map'; @import 'react-collapse'; -@import 'react-codemirror'; +@import 'codemirror'; /** * Hacks for webdriverio isVisibleWithinViewport