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

Move WidthCache measure container to helper container #4807

Merged
merged 1 commit into from
Sep 15, 2023

Conversation

mofux
Copy link
Contributor

@mofux mofux commented Sep 15, 2023

Fixes #4806
Fixes #4805

  • Moves the WidthCache measure container into the Terminal's helper container .xterm-helpers (analog to DomMeasureStrategy used by the CharSizeService)
  • The spans used for the different measurements now also use the xterm-char-measure-element class, which makes sure that those elements are not visible (visibility: hidden).
  • Uses the document reference of the terminal (which refers to the ownerDocument of the terminal element). This makes sure we use the correct document reference when creating DOM elements.

Tested against latest Chrome and Firefox on Linux

@mofux mofux requested review from jerch and Tyriar September 15, 2023 09:15
Copy link
Member

@Tyriar Tyriar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, @jerch could you give this a look too?

@Tyriar Tyriar added this to the 5.4.0 milestone Sep 15, 2023
@Tyriar Tyriar self-assigned this Sep 15, 2023
Copy link
Member

@jerch jerch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thx @mofux.

Regarding the global WidthCache handling we prolly have to rework things here, but lets keep that for an actual PR dealing with this.

@Tyriar Tyriar merged commit a6f5726 into xtermjs:master Sep 15, 2023
18 checks passed
@jayarjo
Copy link

jayarjo commented Oct 23, 2023

Is this fix merged and released yet? Observing overflow problem in Chrome on Mac.

@Tyriar
Copy link
Member

Tyriar commented Oct 23, 2023

@jayarjo not in stable, you can use the beta build to get this fix

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