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

Xterm.js in headless mode yields TypeError on resize #1278

Closed
johnpoth opened this issue Feb 8, 2018 · 2 comments
Closed

Xterm.js in headless mode yields TypeError on resize #1278

johnpoth opened this issue Feb 8, 2018 · 2 comments
Labels
Milestone

Comments

@johnpoth
Copy link
Contributor

johnpoth commented Feb 8, 2018

When running Xterm.js 3.0.2 in headless mode ( i.e not calling the open(container) function) I get:

kubebox.js:2633 TypeError: Cannot read property 'width' of undefined at Terminal.resize (xterm.js:4099)

Which corresponds to this line.

Which is expected since open() wasn't called and so this.charMeasure is undefined. I'm not sure this is needed when running headless. I removed the line and it seems to be working.

If it is needed we could mock the DOM elements by using something like JSDOM?

Thanks!

@Tyriar
Copy link
Member

Tyriar commented Feb 8, 2018

Yes it shouldn't be needed as it's measured when open is called.

@Tyriar
Copy link
Member

Tyriar commented Feb 12, 2018

Fixed in #1280

@Tyriar Tyriar closed this as completed Feb 12, 2018
@Tyriar Tyriar added this to the 3.2.0 milestone Feb 12, 2018
astefanutti added a commit to astefanutti/kubebox that referenced this issue Apr 20, 2018
astefanutti added a commit to astefanutti/kubebox that referenced this issue Apr 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants