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

fit addon and multiple xterm instances #664

Closed
ficristo opened this issue May 15, 2017 · 2 comments
Closed

fit addon and multiple xterm instances #664

ficristo opened this issue May 15, 2017 · 2 comments
Assignees
Labels
type/documentation Regarding website, API documentation, README, etc.
Milestone

Comments

@ficristo
Copy link
Contributor

When I call xterm.fit() when terminal is not visible in the page (display: none) it seems to me it does nothing.
Debugging a little, window.getComputedStyle(term.element.parentElement).getPropertyValue('width') return auto instead of a number.
Is there a way to make it work?
Maybe it is the expected behaviour, if so it would be nice to add some hints in the docs.

Details

  • Browser and browser version: -
  • OS version: -
  • xterm.js version: 2.6.0
@Tyriar
Copy link
Member

Tyriar commented May 15, 2017

@parisk this is probably as designed, how can you fit to an element if it's not visible? If so we should add a note to https://xtermjs.org/docs/api/addons/fit/

@Tyriar Tyriar added the addon label May 15, 2017
@parisk parisk added the type/documentation Regarding website, API documentation, README, etc. label May 16, 2017
@parisk parisk added this to the 2.7.0 milestone May 16, 2017
@parisk
Copy link
Contributor

parisk commented May 16, 2017

@Tyriar is right on this. The fit add-on depends on the element's container element and visibility, so I will add a documentation note for this.

@Tyriar Tyriar modified the milestone: 2.7.0 Jun 8, 2017
Tyriar added a commit to Tyriar/xterm.js that referenced this issue Jun 2, 2018
@Tyriar Tyriar added this to the 3.5.0 milestone Jun 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/documentation Regarding website, API documentation, README, etc.
Projects
None yet
Development

No branches or pull requests

3 participants