Enable Enter button to work on all modals with inputs #2312

Closed
opened 2019-03-09 00:34:46 +01:00 by tzarebczan · 2 comments
tzarebczan commented 2019-03-09 00:34:46 +01:00 (Migrated from github.com)

The Issue

This was recently fixed on the Reward code modal, but should work on all modal where inputs are possible (i.e tip, send/receive, delete?).

System Configuration

  • LBRY Daemon version:
  • LBRY App version:
  • LBRY Installation ID:
  • Operating system:

Anything Else

Screenshots

<!-- Thanks for reporting an issue to LBRY and helping us improve! To make it possible for us to help you, please fill out below information carefully. Before reporting any issues, please make sure that you're using the latest version. - App releases: https://github.com/lbryio/lbry-desktop/releases - Standalone daemon: https://github.com/lbryio/lbry/releases We are also available on live chat at https://chat.lbry.io --> ## The Issue This was recently fixed on the Reward code modal, but should work on all modal where inputs are possible (i.e tip, send/receive, delete?). ## System Configuration <!-- For the app, this info is in the About section at the bottom of the Help page. You can include a screenshot instead of typing it out --> <!-- For the daemon, run: curl 'http://localhost:5279' --data '{"method":"version"}' and include the full output --> - LBRY Daemon version: - LBRY App version: - LBRY Installation ID: - Operating system: ## Anything Else <!-- Include anything else that does not fit into the above sections --> ## Screenshots <!-- If a screenshot would help explain the bug, please include one or two here -->
neb-b commented 2019-03-09 00:41:41 +01:00 (Migrated from github.com)

This should be pretty straight forward. Currently we let the modal components handle the submit/cancel actions. We need to bring the buttons inside of the form element.

<Modal
  onConfirmed={submitForm}
  type="confirm"
>
  <form>
    ...
  </form>
</Modal>

needs to change to

<Modal>
  <form onSubmit={submitForm}>
    ...
    <Button type="submit" />
  </form>
</Modal>
This should be pretty straight forward. Currently we let the modal components handle the submit/cancel actions. We need to bring the buttons inside of the `form` element. ``` <Modal onConfirmed={submitForm} type="confirm" > <form> ... </form> </Modal> ``` needs to change to ``` <Modal> <form onSubmit={submitForm}> ... <Button type="submit" /> </form> </Modal> ```
tzarebczan commented 2019-03-09 00:48:55 +01:00 (Migrated from github.com)

Yep, I meant to link https://github.com/lbryio/lbry-desktop/pull/2279/files#diff-921813afc64507753cab7239e29ef55dR47 as the fix for the Reward code one for reference!

Yep, I meant to link https://github.com/lbryio/lbry-desktop/pull/2279/files#diff-921813afc64507753cab7239e29ef55dR47 as the fix for the Reward code one for reference!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
LBRYCommunity/lbry-desktop#2312
No description provided.