New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
YAML editor fixes #2737
YAML editor fixes #2737
Conversation
@@ -198,7 +198,7 @@ export class HuiEditCard extends LitElement { | |||
if (!this._uiEditor) { | |||
setTimeout(() => { | |||
this.yamlEditor.codemirror.refresh(); | |||
}, 1); | |||
}, 50); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is it that we're waiting for, and can we wait for that specifically? (like maybe this.updateComplete
?). Because it really depends on the speed of your computer/phone etc if 50 is going to be enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we are waiting for the dialog to be resized... the update of the element itself is already complete...
Fixes #2723 |
f241ee6
to
d915483
Compare
setTimeout(() => { | ||
this.yamlEditor.codemirror.refresh(); | ||
}, 1); | ||
afterNextRender(() => this.yamlEditor.codemirror.refresh()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
afterNextRender(() => this.yamlEditor.codemirror.refresh()); | |
afterNextRender(() => { this.yamlEditor.codemirror.refresh(); this._resizeDialog(); }); |
No description provided.