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

"Cannot read properties of undefined (reading 'getRasterizedGlyph')" when a target element is not displayed #4560

Closed
schoonc opened this issue Jun 15, 2023 · 4 comments · Fixed by #4596
Labels

Comments

@schoonc
Copy link

schoonc commented Jun 15, 2023

After upgrading from 4.18.0 to 5.2.1, if the mount point is not displayed (e.g. some parent has display: none), this causes an error and xterm crashes. In 4.18.0 this problem was not present.

Details

  • Browser and browser version: Vivaldi 6.1.3035.50
  • OS version: Ubuntu 23.04
  • xterm.js version: 5.2.1

Steps to reproduce

Code:

<div style="display: none" id="target"></div>
import { Terminal } from 'xterm'
import { CanvasAddon } from 'xterm-addon-canvas'

const terminal = new Terminal()
terminal.loadAddon(new CanvasAddon())
terminal.open(document.getElementById('target'))

Console output:
image

@JounQin
Copy link

JounQin commented Jun 27, 2023

Any schedule to fix this issue?

I noticed there are also several _charAtlas?. usage, can we just add if (!this._charAtlas) { return }? (Sorry I'm not familiar with the source codes)

@AndreSilva1993
Copy link

AndreSilva1993 commented Jul 17, 2023

Will this be released? This issue is the only thing blocking us to upgrade since it breaks our automated tests.

@Tyriar
Copy link
Member

Tyriar commented Jul 17, 2023

@AndreSilva1993 you can use the latest beta build which is released on every commit, VS Code is periodically updated to the latest beta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants