Improved tab behavior

A small fix/improvement to improve the manual entry of items.

Current behavior:
* Start entering text in field that supports auto-complete suggestions, for example, Place
* Suggestion start being displayed and can be selected with arrow keys
* Accepting and entering a suggestion requires hitting enter twice or hitting enter once and then use tab to go to the next field.
* if you hit tab after having selected the suggestion, only the letters manually entered go into the field and the next field is selected. Example: I enter "Pa", select "Paris" from the suggestions, and then hit tab, only "Pa" will be entered into the field.

Expected/improved behavior:
* after having selected a suggestions with arrow key, hitting enter produces the same behavior as now (the assumption being that the suggestion is only part of what I want in the field).
* hitting tab, however, should enter the selected suggestion and not only the letters entered so far.

It's a small thing, but IMHO this is non-standard behavior and often leads to errors in fields when I manually add entries.

Cheers,
Harald.
  • huh - while I don't have a strong opinion on what's better, I think what you suggest is non-standard. I've never seen tab confirm an auto-complete suggestion. What software are you looking at for an example?
  • Google Search (at google.com) performs a search when you tab on an entry in the autocomplete dropdown. That's not really a selection, though.

    In Google Chrome, tabbing on an item in the address bar dropdown changes focus on the next item in the dropdown menu.
  • I was primarily thinking of HTML forms in Firefox or Chrome, and as Zotero used to be a FF extension I guess I thought of Zotero fields should behave in the same way.

    I don't know -- it just seems sensible to me: after having used the arrow key in order to select a suggestion, it just doesn't make sense to me to then jump back to only the letters entered before that. If I didn't want the suggestion I wouldn't have arrow-chosen it in the first place, or at I wouldn't move to the next field with tab but edit it.

    But as I said, no huge deal.
  • You mean a drop-down form like http://www.echoecho.com/tooldropdown.htm ? The difference is that these don't allow for free-form input, whereas the tag field in Zotero does.

    That said, I agree with you that it would be nice if tabbing would just select the entry. I also often accidentally create truncated tags.
  • No, I meant free-form text fields, the most common variety probably being username fields.

    Like this:

    <form>
    First name: <input type="text" name="firstname"><br>
    Last name: <input type="text" name="lastname">
    </form>
  • Harald is right - when you fill out forms on the web, something like http://www.zotero.org/zotero/workshopregistration - and Firefox offers you an autocomplete option - for the e-mail field e.g., selecting it with down arrow and pressing tab uses the autocomplete and goes to the next field.

    I think that's pretty compelling.
    Dan - hard to implement?
  • Ah, right. Big + for me.
  • (as another data point - this is already the behavior in the online library at least in Firefox)
  • Woo, ticket created in less than 6 hours! Thanks everyone.
  • (Though maybe a bit less impressive if you consider that there was actually a three-year-old ticket for this in the old bug tracker. Still, progress!)
  • Autocomplete tab behavior changed for 4.0.20.
Sign In or Register to comment.