mathlive icon indicating copy to clipboard operation
mathlive copied to clipboard

Bug: Mathfield stylesheet does not apply after consecutive unmounts and mounts.

Open kristofk01 opened this issue 2 years ago • 5 comments
trafficstars

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:

IMG_6253

Steps to Reproduce

  1. Mount math-field.
  2. Interact with the page.
  3. Unmount math-field.
  4. Interact with the page.
  5. 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)

kristofk01 avatar Oct 28 '23 01:10 kristofk01

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?

screambeard avatar Dec 06 '23 09:12 screambeard

Thanks for the comment @screambeard, looks like I accidentally closed this issue. I have replicated the issue again with the latest version of mathlive.

kristofk01 avatar Dec 06 '23 12:12 kristofk01

@screambeard can you confirm that you are also seeing this issue, but only on iOS?

arnog avatar Dec 06 '23 19:12 arnog

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.

screambeard avatar Dec 07 '23 15:12 screambeard

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)"

arnog avatar Dec 08 '23 05:12 arnog

You may be right. I have been unable to reproduce this on iOS 17.1 and 17.2.x

kristofk01 avatar Jan 14 '24 10:01 kristofk01

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 avatar Jan 27 '24 16:01 arnog

@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 avatar Apr 06 '24 06:04 loveleet-convivity

@loveleet-convivity unlikely to be related, since this issue was specific to iOS and you're seeing your issue in Chrome.

arnog avatar Apr 06 '24 14:04 arnog