Page MenuHomePhabricator

[native] Ignore edit button presses while saving
AbandonedPublic

Authored by ashoat on May 31 2024, 6:33 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 2, 6:13 AM
Unknown Object (File)
Sat, Nov 2, 6:13 AM
Unknown Object (File)
Sat, Nov 2, 5:48 AM
Unknown Object (File)
Thu, Oct 10, 10:12 PM
Unknown Object (File)
Thu, Oct 10, 10:12 PM
Unknown Object (File)
Thu, Oct 10, 10:12 PM
Unknown Object (File)
Oct 5 2024, 5:08 PM
Unknown Object (File)
Oct 3 2024, 11:46 AM
Subscribers
None

Details

Reviewers
tomek
Summary

If you're editing an Entry, change the text, and then hit the "Save" button, the first event that fires now is onBlur (see here for more context).

The onBlur results in a save being triggered, and this.state.editing is unset. After that, the save button onPress is now triggered (previously this came first).

To avoid the onPress causing us to go back into an editing mode, we can ignore it here while the save is ongoing.

Test Plan

Confirm that we don't refocus the Entry if you hit "Save" after editing and changing the text

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

ashoat edited the summary of this revision. (Show Details)

Not sure this is necessary after this realization. Will investigate more before submitting to review again

This is no longer necessary after D12276