Error while using fit addon with canvas addon #4641
Replies: 3 comments 1 reply
-
Any more info on this? I tried and could not reproduce in Chrome or Firefox. I used these two files: index.html: <script src="./node_modules/xterm/lib/xterm.js"></script>
<script src="./node_modules/xterm-addon-canvas/lib/xterm-addon-canvas.js"></script>
<script src="./node_modules/xterm-addon-fit/lib/xterm-addon-fit.js"></script>
<script src="./index.js"></script> index.js: let terminal = new Terminal();
let fitAddon = new FitAddon.FitAddon();
terminal.loadAddon(fitAddon);
terminal.loadAddon(new CanvasAddon.CanvasAddon());
fitAddon.fit(); |
Beta Was this translation helpful? Give feedback.
-
This seems to be caused by me using xterm in react with StrictMode which causes components to double render. This error suggests that there is something I wasn't cleaning up in my code. Is it possible to call |
Beta Was this translation helpful? Give feedback.
-
If you call dispose you cannot use it again, you can call open on different elements though. |
Beta Was this translation helpful? Give feedback.
-
Using the fit addon with the canvas addon causes an error when calling
.fit()
.Details
Steps to reproduce
npm install xterm xterm-addon-fit xterm-addon-canvas
Beta Was this translation helpful? Give feedback.
All reactions