Skip to content

[Bug] Copy button tooltip of diagnostic text is offset and uses different font #5112

@spahnke

Description

@spahnke

Reproducible in vscode.dev or in VS Code Desktop?

  • Not reproducible in vscode.dev or VS Code Desktop

Reproducible in the monaco editor playground?

Monaco Editor Playground Link

https://microsoft.github.io/monaco-editor/playground.html?source=v0.55.0-dev-20251107#XQAAAAK_BQAAAAAAAABBqQkHQ5NjdPxdelU4WDonmpKI0l8ZnxhC4nZWoCuAJKxoZZcn0NoL7hbtycI-KVso3hyOWZPoky0J3nxQx8SlilhIluPIv9y8o1iPogzx7efS0zuJUWlhXey9rLBx5DHddr7uilPEWupI5TlBi5gNvhEE1blHHx0J4OkmWGx7Rfr5wBMG33E8LTEj0ovfa8eq7N7kjZl-uvoQ71URuDraU4JMamg_HhlnjSTth2GYXUcrt-r5Cnxa-fLHN4y55s1xbFbEhrvoWdkYavRsFzrkQFoSEfivMn5w-WegZ3hJeQ7nTaLVCerXmEibf40FBsfxvSQojfcr-sTYOVdlmVR6u3_a8-AyfxZoU5wzUY2d3iOkdqgs21MWkQh07GJgbLE4AjHEPORwlDMxpj4VLmO43V-H-upaKorvH2W4MlNGOEeya0bz08I6y6Tv5Y4qSbVvg2lRv8jl6r9_3vMk6k5387EWOXc3vQZ2fyQUk0tYqBp-xz1HBbJ3PPvuUNb9gsXWaAylxa7N-l-Ls1ZIMJ1Kz9oOPIFqQRJtMRJwOJ8pUIKtri7fLsDtQ6laa0Kw3UDv1oGEO65hsoXf_XBfR65uur_Zf4Gn7oaeypEFQyvyKzAB6UH7DMeqOXaut2YIc-QiJBDZgdC_orsMrK-xiZMJCDlThssRRHo4MnFbyCjmUalgo3_v3AnZIBnd9r_ee3qijNPadZa4FzclWomdtiE09v2WKn9OMhMJU3Ax7cPr9Iz27BTkoLcPMW1ixO7AMq9YadJlxqOSpQAB76ZP6IEP1ipKSGgzxScZ-H2s3fN-QxxF9zKw2IzygjlHvFenul6z9b-nNMXg_YoPRdKALbODwu5C9W43GQMRAxUoUc5rjow5eTJgU4VyIPB9LD7XGF4Jr7XkoRtjSLIFjsdNeBUAL_3KoC-AANghn89M5-f8ZPwU6O7aVd3dXWmrcYNP-cJwSG8bhUBeso-mMPY2V7TimryWJPh9ixfNfXz6ZZ87GdmE90yWk0L4-v5Qbo7ku7Ho3OO_592AOlbpUMT5twy9h_7U6iI

Monaco Editor Playground Code

Reproduction Steps

Use the "Configure JavaScript Defaults" example, enable semantic validation, introduce an error in the code (e.g. next() -> nex()) and add div with some height into the HTML snippet before the editor

<div style="height: 50px">test</div>

Actual (Problematic) Behavior

Hovering the new "Copy" button of the diagnostic text shows the tooltip offset from the button by the height of the preceding HTML element (in this example 50px), and the text itself uses a serif font different from the rest of the editor

Image

Expected Behavior

Tooltip is aligned properly and uses consistent font.

Additional Context

0.55.0-dev-20251107

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions