During some test I noticed users wouldn't confirm a value by pressing enter on by selecting a item with the mouse.
So I'm now submitting also "on blur", when a user presses tab or mouse clicks somewhere else.
This can be done in the 7.x-2.x-dev version by adding the following in autocomplete_deluxe.js to the blur function.
var value = jqObject.val();
if(value != '') {
var ui_item = {
label: value,
value: value
};
self.addValue(ui_item);
}Would be great if this could be an configurable option.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | autocomplete_deluxe-submit_onlur-1853896-1.patch | 582 bytes | s.daniel |
Comments
Comment #1
s.daniel commentedI did some usability testing and had the same experience. People don't expect to loose their input when tabbing to the next field!
I can't think of a use case where it would make sense to delete the text so I think this should be default.
Attached is a patch.
Comment #2
bleen commentedThis is a much better UX
Comment #2.0
bleen commentedclean up
Comment #4
sepgil commentedThx, just comitted the patch.
Comment #6
sepgil commentedI had to revert this patch, since it caused the issue described in #1827336: Typing a partial value and clicking on the match creates new value based on the partial value. I additionally found out, that it didn't work jQuery 1.7, so it was somehow useless any way(at least for me).
It would still be nice to have this behaviour, but I currently don't have the time to implement this feature correctly. It would be cool, if someone else could create a new proper patch.
Comment #7
rajab natshah