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: Replace missing click handler in revision slider #1837

Merged
merged 2 commits into from
Jan 21, 2020

Conversation

dmsnell
Copy link
Member

@dmsnell dmsnell commented Jan 16, 2020

In paFIJd-8t it was reported that note corruption was occurring when viewing the history of one note when it gets updated remotely. Although this fix may or may not address that problem a code audit revealed that in #1792 I removed what appeared to be an unused function when it was in fact used by the component's onClickOutside wrapper.

The missing handler function closed out of the revision slider when clicking anywhere else. Without it, the thread handling the click crashed but since it was a callback it didn't crash the app. A message appeared in the developer console indicating that the handler was missing.

Because we haven't been closing the revision slider it has become possible to start editing a note while the revisions are still open, something prevented before by way of the click handler. Thus, if viewing a revision, clicking anywhere else, and continuing, then we fill the editor with what it thinks is a note (and not a revision) and then will respond to remote updates with the contents of that revision before accepting remote updates.

Testing

This can be verified my making edit operations on multiple devices with the revision slider open.
It's also exposed if you open the revision slider and then click inside the note and make change.

Before

revisionSliderBroken mov

After

revisionSliderFixed mov

@dmsnell dmsnell added the bug Something isn't working label Jan 16, 2020
@dmsnell dmsnell requested a review from a team January 16, 2020 04:40
@dmsnell dmsnell force-pushed the fix/non-closing-revision-selector branch from 5d9ace5 to dd94598 Compare January 16, 2020 21:56
In paFIJd-8t it was reported that note corruption was occurring when viewing the history of one note when it gets updated remotely. Although this fix may or may not address that problem a code audit revealed that in #1792 I removed what appeared to be an unused function when it was in fact used by the component's `onClickOutside` wrapper.

The missing handler function closed out of the revision slider when clicking anywhere else. Without it, the thread handling the click crashed but since it was a callback it didn't crash the app. A message appeared in the developer console indicating that the handler was missing.

Because we haven't been closing the revision slider it has become possible to start editing a note while the revisions are still open, something prevented before by way of the click handler. Thus, if viewing a revision, clicking anywhere else, and continuing, then we fill the editor with what it thinks is a note (and not a revision) and then will respond to remote updates with the contents of that revision before accepting remote updates.
@dmsnell dmsnell force-pushed the fix/non-closing-revision-selector branch from dd94598 to 67558d4 Compare January 17, 2020 01:30
Copy link
Contributor

@belcherj belcherj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works as expected, good catch.

@dmsnell dmsnell merged commit 43bc2a5 into develop Jan 21, 2020
@dmsnell dmsnell deleted the fix/non-closing-revision-selector branch January 21, 2020 19:06
dmsnell added a commit that referenced this pull request Jan 21, 2020
In paFIJd-8t it was reported that note corruption was occurring when viewing the history of one note when it gets updated remotely. Although this fix may or may not address that problem a code audit revealed that in #1792 I removed what appeared to be an unused function when it was in fact used by the component's `onClickOutside` wrapper.

The missing handler function closed out of the revision slider when clicking anywhere else. Without it, the thread handling the click crashed but since it was a callback it didn't crash the app. A message appeared in the developer console indicating that the handler was missing.

Because we haven't been closing the revision slider it has become possible to start editing a note while the revisions are still open, something prevented before by way of the click handler. Thus, if viewing a revision, clicking anywhere else, and continuing, then we fill the editor with what it thinks is a note (and not a revision) and then will respond to remote updates with the contents of that revision before accepting remote updates.

(cherry picked from commit 43bc2a5)
dmsnell added a commit that referenced this pull request Jan 21, 2020
In paFIJd-8t it was reported that note corruption was occurring when viewing the history of one note when it gets updated remotely. Although this fix may or may not address that problem a code audit revealed that in #1792 I removed what appeared to be an unused function when it was in fact used by the component's `onClickOutside` wrapper.

The missing handler function closed out of the revision slider when clicking anywhere else. Without it, the thread handling the click crashed but since it was a callback it didn't crash the app. A message appeared in the developer console indicating that the handler was missing.

Because we haven't been closing the revision slider it has become possible to start editing a note while the revisions are still open, something prevented before by way of the click handler. Thus, if viewing a revision, clicking anywhere else, and continuing, then we fill the editor with what it thinks is a note (and not a revision) and then will respond to remote updates with the contents of that revision before accepting remote updates.

(cherry picked from commit 43bc2a5)
dmsnell added a commit that referenced this pull request Jan 24, 2020
In #1837 we added the change notes to v1.15.0's notes and it looked like it may
have not been able to get into v1.14.0; however, we cherry-picked it in to the
next release in #1850 and this needs to move back into the proper section.
dmsnell added a commit that referenced this pull request Jan 24, 2020
In #1837 we added the change notes to v1.15.0's notes and it looked like it may
have not been able to get into v1.14.0; however, we cherry-picked it in to the
next release in #1850 and this needs to move back into the proper section.
@codebykat codebykat added this to the 1.14 milestone Dec 23, 2020
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.

3 participants