mathlive
mathlive copied to clipboard
Bug: Mathfield stylesheet does not apply after consecutive unmounts and mounts.
Description
Mathfield styling disappears sporadically on consequent unmounts and mounts.
There are no runtime or TypeScript errors.
I am using the following logic to customise when the math-field should appear:
mf.mathVirtualKeyboardPolicy = "manual";
mathVirtualKeyboard.show();
mf.addEventListener("unmount", () => mathVirtualKeyboard.hide());
This is what the issue looks like:
Steps to Reproduce
- Mount math-field.
- Interact with the page.
- Unmount math-field.
- Interact with the page.
- Mount math-field => styling missing.
Actual Behavior
Styling on math-field element is not applied.
Expected Behavior
Styling on math-field element should be applied.
Environment
MathLive version 0.95.5
Operating System iOS 16.x.x and 17.0.x
Browser Safari (mobile only, desktop seems to work fine)
Sorry for asking a question in a closed issue, but we encountered the same issue a while back. I see this one is closed, but I don't see a mentioning of the issue number (#2165) in the CHANGELOG. Could you confirm this issue is closed because it has been fixed?
Thanks for the comment @screambeard, looks like I accidentally closed this issue. I have replicated the issue again with the latest version of mathlive.
@screambeard can you confirm that you are also seeing this issue, but only on iOS?
We got another report from one of our users facing this issue. We are currently collecting more information to see if we get a good path to replicate this. When we have more information I will post this here.
Do you have any report of this happening with iOS 17.1 or later?
There was a potentially relevant fix in iOS 17.1: "Fixed intermittent removal of adoptedStyleSheet CSSStyleSheet instances when assigning an adoptedStyleSheet array. (107768559)"
You may be right. I have been unable to reproduce this on iOS 17.1 and 17.2.x
I'm going to assume that this was fixed in Safari. Please reopen if you see it again on iOS 17.1 or later.
@arnog i'm getting issue of keyboard. error is "Uncaught TypeError: document.adoptedStyleSheets is not iterable" and i'm specifically this error on chrome my chrome version is "Version 123.0.6312.107 (Official Build) (arm64)" and mac version 14.4
@loveleet-convivity unlikely to be related, since this issue was specific to iOS and you're seeing your issue in Chrome.