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)
Tue, Jun 11, 7:36 PM
Unknown Object (File)
Mon, Jun 10, 2:02 PM
Unknown Object (File)
Mon, Jun 10, 4:08 AM
Unknown Object (File)
Sun, Jun 9, 10:33 PM
Unknown Object (File)
Sun, Jun 9, 4:27 PM
Unknown Object (File)
Sun, Jun 9, 9:12 AM
Unknown Object (File)
Sat, Jun 8, 9:31 PM
Unknown Object (File)
Fri, Jun 7, 1:08 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