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

fix(text-editor): avoid occasional null reference error #3373

Merged
merged 1 commit into from
Dec 18, 2024
Merged

Conversation

adrianschmidt
Copy link
Contributor

@adrianschmidt adrianschmidt commented Dec 18, 2024

This is a commit I had on a branch which I later abandoned. Because it has been a while since I made the change, I don't actually remember how to reproduce this null reference error, but it happened when I was looking into the trigger not working on iOS, and so I thought I'd just add optional chaining to try to avoid the error.

I managed to reproduce it while playing around with inserting html while the editor was in html content mode:

image image

I had inserted a "mention", and then backspaced to delete it, and I think it was when I deleted the last thing in the editor (the blank line that had been inserted by the html-insertion, not sure if that's a <br> or a <p></p>).

I was not able to consistently reproduce it though 😕 🤷‍♂️

Review:

  • Commits are atomic
  • Commits have the correct type for the changes made
  • Commits with breaking changes are marked as such

Browsers tested:

(Check any that applies, it's ok to leave boxes unchecked if testing something didn't seem relevant.)

Windows:

  • Chrome
  • Edge
  • Firefox

Linux:

  • Chrome
  • Firefox

macOS:

  • Chrome
  • Firefox
  • Safari

Mobile:

  • Chrome on Android
  • iOS

@adrianschmidt adrianschmidt self-assigned this Dec 18, 2024
@adrianschmidt adrianschmidt added the bug Something isn't working label Dec 18, 2024
Copy link

Documentation has been published to https://lundalogik.github.io/lime-elements/versions/PR-3373/

@john-traas
Copy link
Contributor

Ah yes, I've seen this error occasionally as well.

@john-traas john-traas merged commit 26860c4 into main Dec 18, 2024
12 checks passed
@john-traas john-traas deleted the null-ref branch December 18, 2024 09:07
@lime-opensource
Copy link
Collaborator

🎉 This PR is included in version 37.76.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants