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

Greetings that use callback function runs multiple times #855

Closed
2 tasks done
jcubic opened this issue Feb 1, 2023 · 0 comments
Closed
2 tasks done

Greetings that use callback function runs multiple times #855

jcubic opened this issue Feb 1, 2023 · 0 comments
Labels
Bug resolved if issue is resolved, it will be open until merge with master

Comments

@jcubic
Copy link
Owner

jcubic commented Feb 1, 2023

Issue summary

When you use greetings as a function can call callback function. The greetings is rendered multiple times. 2 times on init and on every resize. Found by @leif in #853

Expected behavior

It should render once

Actual behavior

it renders multiple times

Steps to reproduce

Use this code:

const term = $('body').terminal({}, {
    greetings(cb) {
        cb(`This Terminal has ${this.cols()} cols`);
    }
});

Browser and OS

All

  • Write code
  • Write unit tests
@jcubic jcubic added the Bug label Feb 1, 2023
jcubic added a commit that referenced this issue Feb 1, 2023
jcubic added a commit that referenced this issue Feb 3, 2023
@jcubic jcubic added the resolved if issue is resolved, it will be open until merge with master label Feb 3, 2023
@jcubic jcubic closed this as completed Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug resolved if issue is resolved, it will be open until merge with master
Projects
None yet
Development

No branches or pull requests

1 participant