🐛 Fixed editor performance issues in Safari for posts with HTML or Markdown cards (#20806)
ref https://linear.app/tryghost/issue/ONC-261 - Previous method of hiding the second Lexical instance using `width: 0`, `height: 0`, and `overflow: hidden` caused CPU usage to spike, likely due to CodeMirror continuously processing the element.
This commit is contained in:
parent
54b0b87633
commit
3645fd8a5c
@ -680,7 +680,7 @@ export default class KoenigLexicalEditor extends Component {
|
||||
|
||||
const KGEditorComponent = ({isInitInstance}) => {
|
||||
return (
|
||||
<div data-secondary-instance={isInitInstance ? true : false} style={isInitInstance ? {width: 0, height: 0, overflow: 'hidden'} : {}}>
|
||||
<div data-secondary-instance={isInitInstance ? true : false} style={isInitInstance ? {display: 'none'} : {}}>
|
||||
<KoenigComposer
|
||||
editorResource={this.editorResource}
|
||||
cardConfig={cardConfig}
|
||||
|
Loading…
Reference in New Issue
Block a user