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

Reproducing the Firefox SVG bug #1220

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Reproducing the Firefox SVG bug #1220

wants to merge 2 commits into from

Conversation

elpoelma
Copy link
Contributor

@elpoelma elpoelma commented Oct 12, 2024

Overview

Ok, so this PR is a weird one.
It seems that Firefox + inline SVGs + prosemirror do not mix well in combination with selections.

Why?
I can't say I have really an idea

What is the solution?
There is no real (complete) solution at the moment.
prosemirror-view 1.43.3 contains some fixes related to this, but they don't solve all cases/issues.

What does this PR contain?

  • An update to prosemirror-view 1.43.3
  • A way to easily reproduce the bug on the sample pages. I have added a FirefoxSVGBug sample document to be able to easily reproduce the issues. I have added a specific node-spec + non-ember node-view containing an inline SVG.

TODOS:

  • We can detect whether the current browser engine is Gecko, and then disable the inline SVGs in nodes
connected issues and PRs:

None

How to test/reproduce

  • Open any dummy page on firefox
  • Insert the FirefoxSVGBug sample
  • Try to create selections around both link and the firefox_svg_bug nodes.
    • The behaviour around link nodes should be improved, but is far from perfect (flickering etc.)
    • The behaviour around firefox_svg_bug nodes should be completely broken.
  • Test the same sample in a chromium browser, it should work without issues.

Challenges/uncertainties

I was kinda losing my mind when trying to reproduce this issues, so it could very well be I missed something trivial.

Checks PR readiness

  • UI: works on smaller screen sizes
  • UI: feedback for any loading/error states
  • Check cancel/go-back flows
  • Check database state correct when deleting/updating (especially regarding relationships)
  • changelog
  • npm lint
  • no new deprecations

@elpoelma elpoelma added the bug Something isn't working label Oct 12, 2024
@elpoelma elpoelma self-assigned this Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant