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

Return/Esc doesn't close editor after editing field #176

Open
dstillman opened this issue Apr 13, 2018 · 4 comments
Open

Return/Esc doesn't close editor after editing field #176

dstillman opened this issue Apr 13, 2018 · 4 comments
Assignees
Labels

Comments

@dstillman
Copy link
Member

  1. Open editor
  2. Click in field, type "Test"
  3. Press Return.

The field is saved, but neither Return nor Esc close the editor until something else if focused. Tested in Firefox.

But while we're fixing this, I think Return in a field should just close the editor. There's not really any other reason to press Return.

tnajdek added a commit that referenced this issue Apr 20, 2018
Handles cases where focus is lost (e.g. after making a selection in select box)
@tnajdek
Copy link
Member

tnajdek commented Apr 20, 2018

I've fixed a case where after following steps you've described, pressing Esc wouldn't close the editor.

But while we're fixing this, I think Return in a field should just close the editor. There's not really any other reason to press Return.

Personally I don't think that's the case. In select boxes pressing Enter confirms selection (Tab also does, but most people will still press enter), thus I believe it should do the same (i.e. confirm change) in other fields, it actually works in text areas with Shift+Enter as well.

@dstillman
Copy link
Member Author

I do think there's a difference between an autocomplete selection and pressing Return in the field. E.g., in Zotero, Return will select from the autocomplete, and the field stays open, and then Return again saves the entry and returns focus to the middle pane. But you may be right that people will press Return a lot once they've typed in a field and having it close the window would be annoying, so we can try it this way.

@dstillman
Copy link
Member Author

After trying this out more I'm still not convinced that not closing the dialog on Return is right. I think it's important to remember that we're showing these as open text boxes, which makes them fairly equivalent to a web form where Return often submits the form. I think a drop-down is a different case — just how, in a web form, if there's an open drop-down, Return will make the selection but not submit the form.

We should at the very least close on an unfocused Return — making that equivalent to Esc, which feels scarier to use, since it also cancels some of the time — but I still don't really see a reason why you shouldn't be able to just move through the dialog with Tab and then press Return when you're done.

@dstillman dstillman reopened this Apr 28, 2018
@dstillman
Copy link
Member Author

(Every time I use the editor to edit a field I find it frustrating that pressing Return after typing doesn't close it.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants