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 certain iOS editors failing to load and save note content #42

Merged
merged 5 commits into from
Aug 9, 2021

Conversation

SebTota
Copy link
Contributor

@SebTota SebTota commented Aug 8, 2021

Reference Issue: #15

lib/componentRelay.ts Outdated Show resolved Hide resolved
lib/componentRelay.ts Outdated Show resolved Hide resolved
Co-authored-by: Johnny A. <[email protected]>
@SebTota
Copy link
Contributor Author

SebTota commented Aug 9, 2021

I'm not sure if the comment should be changed now as well since we will no longer be simply taking the first event that comes. Would you agree?

lib/componentRelay.ts Outdated Show resolved Hide resolved
lib/componentRelay.ts Outdated Show resolved Hide resolved
@moughxyz moughxyz merged commit 0a08f9f into standardnotes:main Aug 9, 2021
@moughxyz
Copy link
Member

moughxyz commented Aug 9, 2021

Hmm tests are failing for me locally now. @SebTota can you run the tests locally to see if the same?

@SebTota
Copy link
Contributor Author

SebTota commented Aug 9, 2021

@mobitar Sorry, I didn't have a chance to test locally yet with all the new changes.

I just tested now, and it seems like the typeof this.component.origin === 'undefined' is actually causing the problem. I may have to wait until later to figure out why, but I will let you know what I find. Feel free to revert for now if you need to.

I did ignore the failed tests and built anyway and the changes do seem to fix the problem on iOS. I also tested with Bold Editor just to make sure nothing broke and it works well.

@SebTota
Copy link
Contributor Author

SebTota commented Aug 9, 2021

From a quick glance, this might be the problem.

@SebTota
Copy link
Contributor Author

SebTota commented Aug 9, 2021

@mobitar Please check my most recent commit on my repo. I'm unsure of how to reopen this PR to add the commit.

Update: This fixes the unit tests. Essentially, you always had duplicate events firing in your unit tests but since !"" always returned true it sort of bypassed the problem by just setting the origin to the second event that was fired. The new commit should fix it though.

@moughxyz
Copy link
Member

moughxyz commented Aug 9, 2021

You'd just open another PR with these changes 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants