When a tab contains code colored using ANSI escape sequences and it is dragged to create a new window, the colors are lost.

Here's the file I used in the preview above: https://gist.github.com/mlocati/fdabcaeb8071d5c75a2d51712db24011
Yes, this is a known restriction. It can be fixed once https://github.com/xtermjs/xterm.js/pull/2369 is merged
Yes, this is a known restriction. It can be fixed once xtermjs/xterm.js#2369 is merged
The serialize-addon is not mature currently. Serializing API may change in the future. Anyway, I'm glad my plugin can fix this problem.
BTW, What happened when a tab is dragged out. Can you show me where the code is? Maybe it will help me to design a better API for that addon
Hey @JavaCS3 current "temporary" solution in Fluent is based exactly on your source code ( I believe I have mentioned you by nickname when created PR with your source code ). It seems I've modified plugin's source code slightly to match Fluent needs, but can't remember for sure right now what changes were made.
After I took a quick look at the impl, I found the answer.
Whenever a tab is teared off. It will call the serialize addon to dump the internal xterm.js state into a string. And restore that state whenever it's needed.
Most helpful comment
Yes, this is a known restriction. It can be fixed once https://github.com/xtermjs/xterm.js/pull/2369 is merged