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

Arrow label are sometimes not displayed in embeds #190

Open
UlyssesZh opened this issue Nov 18, 2023 · 5 comments
Open

Arrow label are sometimes not displayed in embeds #190

UlyssesZh opened this issue Nov 18, 2023 · 5 comments
Labels
bug something isn't working discussion ongoing discussion embedded-diagrams regarding diagrams embedded via `<iframe>`

Comments

@UlyssesZh
Copy link

UlyssesZh commented Nov 18, 2023

Arrow label are sometimes not displayed in embeds. Not steadily reproduced: may be fixed by refreshing.

Example
(embedded in here)

Actual:
Screenshot_20231118-093817_Firefox.jpg

Expected:
Screenshot_20231118-094051_Firefox.jpg

The screenshots come from Firefox 119 on Android. Can also be reproduced on Brave on Linux but less steadily.

@varkor
Copy link
Owner

varkor commented Nov 18, 2023

Can I ask what web browser and operating system you're using? I've never experienced this, so it would help to know for debugging purposes.

@varkor varkor added the discussion ongoing discussion label Nov 18, 2023
@UlyssesZh
Copy link
Author

UlyssesZh commented Nov 18, 2023

Can I ask what web browser and operating system you're using? I've never experienced this, so it would help to know for debugging purposes.

Brave on Linux and Firefox on Android. Both can reproduce.

I opened this issue rashly. I edited the issue so that it contains more info now.

@UlyssesZh UlyssesZh changed the title Arrow label are sometimes not displayed Arrow label are sometimes not displayed in embeds Nov 18, 2023
@varkor
Copy link
Owner

varkor commented Nov 27, 2023

Thanks for the additional information. At the moment, I'm having trouble reproducing this issue, which makes it difficult to diagnose. (At the moment I can only test on Brave on macOS, which may exhibit different behaviour.) Does it occur randomly if you open the example and repeatedly refresh? If you notice any situation in which this seems to happen more often, or figure out a way to reproduce it, let me know and I will investigate further.

@varkor varkor added embedded-diagrams regarding diagrams embedded via `<iframe>` bug something isn't working labels Nov 27, 2023
@UlyssesZh
Copy link
Author

UlyssesZh commented Nov 28, 2023

It cannot be reproduced when I directly go to the embed URL. It has problems only when it is actually embedded on another webpage. In the original issue there is a link where it is embedded. Search for quiver in that webpage and you will see a <details> drop-down, and the embed is in there.

Android Firefox is really steadily reproducing the problem.

@varkor
Copy link
Owner

varkor commented Nov 28, 2023

It cannot be reproduced when I directly go to the embed URL. It has problems only when it is actually embedded on another webpage. In the original issue there is a link where it is embedded. Search for quiver in that webpage and you will see a <details> drop-down, and the embed is in there.

Ah, I see, that's helpful, thanks. I've managed to reproduce the issue now. I'll see if I can figure out what's going on.

Edit: the issue is that, sometimes, the bounding rectangle has zero width and height here:

quiver/src/ui.js

Line 5330 in 4a5f197

const bounding_rect = label.query_selector(".katex, .katex-error").bounding_rect();

It's proving a little tricky to debug locally at the moment, so I'm not quite sure what the cause is. Maybe KaTeX is not rendering quickly enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something isn't working discussion ongoing discussion embedded-diagrams regarding diagrams embedded via `<iframe>`
Projects
None yet
Development

No branches or pull requests

2 participants