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

Bug: Pressing 'Enter' cancels the dialog instead of okaying it #69

Open
1 of 2 tasks
ttmc opened this issue Aug 11, 2020 · 3 comments
Open
1 of 2 tasks

Bug: Pressing 'Enter' cancels the dialog instead of okaying it #69

ttmc opened this issue Aug 11, 2020 · 3 comments
Assignees
Labels
bug Something isn't working prio:medium Medium priority

Comments

@ttmc
Copy link

ttmc commented Aug 11, 2020

Description of the bug

When a generated dialog is open in Adobe XD and I press the Enter key on my keyboard, it has the same effect as clicking on the Cancel button (or pressing the Esc key). This is contrary to the Adobe XD user experience pattern given at:

https://adobexdplatform.com/plugin-docs/design/ux-patterns/modal-ux.html#key-commands

Meta-Data:

I'm using the xd-dialog-helper

  • Via npm (i.e. bundle it with webpack)
  • In its standalone-version (i.e. I've copied the dialog-helper.js file into my project)

Version: 1.0.5

@pklaschka pklaschka self-assigned this Aug 11, 2020
@pklaschka pklaschka added bug Something isn't working prio:medium Medium priority labels Aug 11, 2020
@pklaschka
Copy link
Owner

Thank you for submitting this issue. I'll look into it asap (probably early next week).

May I ask on which platform you've noticed this behavior (macOS or Windows)? Thank you very much in advance 🙂.

@ttmc
Copy link
Author

ttmc commented Aug 11, 2020

I noticed this behavior on my Windows 10 machine.

@ttmc
Copy link
Author

ttmc commented Nov 4, 2020

I looked into fixing this bug, but I don't use TypeScript, so I got stuck.

However, I think I narrowed it down to the handling of form's submit event. Here's what the Adobe XD plugin reference docs say about that: https://adobexdplatform.com/plugin-docs/reference/ui/dialogs/dismissal.html

This Adobe XD sample code gives a more concrete example of how to do that. Look for form.onsubmit

And here's where the form's submit event gets handled in this project (i.e. in the source code):

form.onsubmit = actionList.close;

I hope that is enough of a lead for you to figure out what to fix in this project's source code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working prio:medium Medium priority
Projects
None yet
Development

No branches or pull requests

2 participants