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

Wrong bounding boxes on Firefox since Release 82 #2390

Open
mnowakow opened this issue Sep 22, 2021 · 3 comments
Open

Wrong bounding boxes on Firefox since Release 82 #2390

mnowakow opened this issue Sep 22, 2021 · 3 comments
Labels

Comments

@mnowakow
Copy link

Describe the problem
Interacting with the Verovio rendered SVG causes problems, since the bounding boxes (Element.getBoundingClientRect() and SVGGraficsElement.getBBox()) are sized up to the respective right and bottom bound of the current SVG.
This problem only occurs with Firefox since Release 82 (Current Release: 93)

To Reproduce
Steps to reproduce the behavior:

  1. Load an arbitrary MEI with Verovio (e.g. the tutorial)
  2. Use a Firefox Release >= 83 && <= 93
  3. Check SVG Element in browser inspector (e.g. document.querySelector(".measure"), or document.querySelector(".layer)

Expected behavior
The example statements should only display the bounding box visually displayed for the element (measure, staff, etc.)

Verovio information

  • 3.6.
  • Javascript

Environment information (as appropriate)

  • MacOS 11.5.2, Windows10
  • Firefox (Release >= 83 && <= 93)

Screenshots
Displayed Bounding Box in Firefox 93 after executing document.querySelector(".staff") (first staff) in browser console
staff bbox firefox 93

Additional context
This problem was already reported to mozilla 10 Months ago.
It is not yet clear if it is a problem with Verovio or with Firefox

@rettinghaus
Copy link
Contributor

This is pretty much a Firefox issue, because in Safari and Chrome everything works fine and as expected.

@craigsapp
Copy link
Contributor

This could be related to issue humdrum-tools/verovio-humdrum-viewer#600 where Firefox was not giving the correct bounding box information for a system. In this case it was a bug in Firefox and I had to adapt my code to compensate.

I have been getting an unrelated strange SVG behavior in Chrome which I will report soon...

@lpugin lpugin added the wontfix label Sep 27, 2021
@WolfgangDrescher
Copy link
Contributor

As a workaround --svg-bounding-boxes can be used to calculate the correct bounding boxes. Note that .note.bounding-box currently only covers the note head (see #3368).

WolfgangDrescher added a commit to WolfgangDrescher/lassus-tricinium-project that referenced this issue Apr 6, 2023
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

5 participants