Skip to content
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

Merged
merged 6 commits into from Feb 13, 2019
Merged

YAML editor fixes #2737

merged 6 commits into from Feb 13, 2019

Conversation

bramkragten
Copy link
Member

No description provided.

@@ -198,7 +198,7 @@ export class HuiEditCard extends LitElement {
if (!this._uiEditor) {
setTimeout(() => {
this.yamlEditor.codemirror.refresh();
}, 1);
}, 50);
Copy link
Member

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.

Copy link
Member Author

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...

@timmo001
Copy link
Contributor

Fixes #2723

setTimeout(() => {
this.yamlEditor.codemirror.refresh();
}, 1);
afterNextRender(() => this.yamlEditor.codemirror.refresh());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
afterNextRender(() => this.yamlEditor.codemirror.refresh());
afterNextRender(() => { this.yamlEditor.codemirror.refresh(); this._resizeDialog(); });

@ghost ghost assigned balloob Feb 13, 2019
@balloob balloob merged commit b384d17 into dev Feb 13, 2019
@ghost ghost removed the in progress label Feb 13, 2019
@delete-merged-branch delete-merged-branch bot deleted the yaml-editor-fixes branch February 13, 2019 23:03
@balloob balloob mentioned this pull request Feb 13, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Jul 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants