bib-web icon indicating copy to clipboard operation
bib-web copied to clipboard

Return/Esc doesn't close editor after editing field

Open dstillman opened this issue 6 years ago • 4 comments

  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.

dstillman avatar Apr 13 '18 15:04 dstillman

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.

tnajdek avatar Apr 20 '18 09:04 tnajdek

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 avatar Apr 20 '18 19:04 dstillman

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 avatar Apr 28 '18 02:04 dstillman

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

dstillman avatar May 10 '18 08:05 dstillman