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

Loading the editor on iOS (when isiOS=true) causes content to be wiped #1971

Closed
2 tasks done
jamesopti opened this issue Oct 3, 2021 · 2 comments
Closed
2 tasks done
Labels
Type: Bug The issue or pullrequest is related to a bug

Comments

@jamesopti
Copy link

jamesopti commented Oct 3, 2021

What’s the bug you are facing?

All our content was disappearing when it was loaded on any device where the isiOS function returned true

We tracked it down to the core NodeView ignoreMutation function

How can we reproduce the bug on our side?

For us this was instantly reproducible in the chrome debugger by just choosing any device that matches the isiOS check (like iPad)

I haven't been able to reproduce in an isolated sandbox but I'll keep trying and update here if I can. I suspect it may only be an issue with nested NodeViews

Can you provide a CodeSandbox?

No response

What did you expect to happen?

Content would not be erased and load as normal.

Anything to add? (optional)

We worked around this with a fork of tiptap react that overrides the ignoreMutation logic above to check if the editor is focused:

if (
      this.dom.contains(mutation.target) &&
      mutation.type === 'childList' &&
      isiOS() &&
      this.editor.isFocused // --- GAMMA CHANGE HERE
    ) {
...

Did you update your dependencies?

  • Yes, I’ve updated my dependencies to use the latest version of all packages.

Are you sponsoring us?

  • Yes, I’m a sponsor. 💖
@jamesopti jamesopti added the Type: Bug The issue or pullrequest is related to a bug label Oct 3, 2021
@philippkuehn
Copy link
Contributor

philippkuehn commented Oct 3, 2021

I suspect it may only be an issue with nested NodeViews

Is this still happening with the latest version of @tiptap/react? Sounds a bit like #1747 which already has been fixed.

@jamesopti
Copy link
Author

Is this still happening with the latest version of @tiptap/react? Sounds a bit like #1747 which already has been fixed.

Well I feel silly for not verifying this on the current version before reporting.

I can't reproduce it anymore! Thanks for double checking I did the obvious @philippkuehn (because I didnt 🤦 )

I'll close this now and reopen if were able to trigger it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug The issue or pullrequest is related to a bug
Projects
None yet
Development

No branches or pull requests

2 participants