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

[Bug] Sticky scroll widget is rendered incorrectly after font size update #4729

Open
1 of 2 tasks
goliney opened this issue Oct 28, 2024 · 0 comments
Open
1 of 2 tasks

Comments

@goliney
Copy link

goliney commented Oct 28, 2024

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

Playground Link

Monaco Editor Playground Code

const value = /* set from `myEditor.getModel()`: */ `def game():
    try:
        try:
            try:
                try:
                    print('hello')
                    print('hello')
                    print('hello')
                    print('hello')
                    print('hello')
                    print('hello')
                    print('hello')
                    print('hello')
                    print('hello')
                    print('hello')
                    print('hello')
                    print('hello')
                    print('hello')
                    print('hello')
                    print('hello')
                    print('hello')
                    print('hello')
                    print('hello')
                    print('hello')
                    print('hello')
                    print('hello')
`;

// Hover on each property to see its docs!
const myEditor = monaco.editor.create(document.getElementById("container"), {
	value,
	language: "python",
	automaticLayout: true,
	fontSize: 10
});

let toggler = true;

setInterval(() => {
	myEditor.updateOptions({ fontSize: toggler ? 30 : 10 });
	toggler = !toggler
}, 2000)

Reproduction Steps

  1. Scroll down so the sticky scroll widget appears
  2. Change editor font size using updateOptions({ fontSize }) while the sticky scroll is still visible

Actual (Problematic) Behavior

The sticky scroll widget has the wrong font size:

Image

Expected Behavior

The sticky scroll widget has the correct font size:

Image

Additional Context

No response

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

No branches or pull requests

1 participant