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

Desktop Safari: Editor background color doesn't update consistently after switching theme #5569

Closed
jeffcompton opened this issue May 30, 2024 · 4 comments
Labels

Comments

@jeffcompton
Copy link

Describe the bug

I've noticed that themes always load correctly on initial render on Desktop Safari, however upon switching from dark > light theme or light > dark theme, the background color often doesn't render as expected.

This issue is reproducible by switching between any light mode and dark mode on Ace Kitchen Sink.

Expected Behavior

Switching from the theme: Chrome > Molokai should have rendered a black background

Current Behavior

Switching from the theme: Chrome > Molokai did not render a black background

Reproduction Steps

On Desktop Safari, go to Ace Kitchen Sink and follow the steps I shared in this screen recording. It's also easily to reproduce by creating a simple sample project with just an editor, and a timer/dark mode observer to change the theme from light > dark or vice versa.

AceEditorThemeBug.mov

Possible Solution

No response

Additional Information/Context

No response

Ace Version / Browser / OS / Keyboard layout

Ace Version 1.34.2 / Safari 17.5 / QWERTY

@nightwing
Copy link
Member

@akoreman since safari have not fixed this bug for a long time, should we add setTimeout workaround from #5226 (comment) to our setTheme?

@marinsokol5
Copy link
Contributor

marinsokol5 commented May 31, 2024

Interesting issue, it does seem that Safari doesn't update once the styles update.

They even show the correct new styles in the Computed tab, but it's just rendered wrong.
And it does get rendered correctly on any window change, such as resizing it.

@marinsokol5
Copy link
Contributor

marinsokol5 commented May 31, 2024

@nightwing Where would you add it?

I tried adding it inside of https://github.com/ajaxorg/ace/blob/master/src/virtual_renderer.js#L1921, but I still have the problem, so the fix doesn't seem to work for me.

@InspiredGuy
Copy link
Contributor

#5573 with a workaround was merged, will be available in the next release

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

No branches or pull requests

4 participants