Page MenuHomePhabricator

[native] Ignore edit button presses while saving
AbandonedPublic

Authored by ashoat on May 31 2024, 6:33 PM.
Tags
None
Referenced Files
F3353541: D12260.diff
Sat, Nov 23, 10:13 AM
Unknown Object (File)
Mon, Nov 11, 2:25 PM
Unknown Object (File)
Mon, Nov 11, 1:34 PM
Unknown Object (File)
Mon, Nov 11, 5:43 AM
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)
Oct 10 2024, 10:12 PM
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