MassAutocomplete
MassAutocomplete copied to clipboard
Long press on menu item cause detach and the item is not selected
This is happening when the press is longer the debounce_blur
.
The input losses focus which triggers detach. Since the item is pressed the click event does not invoke apply_selection
. The apply selection does not regain focus back to the input field so detach considers it as if the input just lost focus and clears everything. When the click is finally invoking apply_selection
the item is already detached and the selection is ignored.
This can be possibly be solved by using on-mousedown
instead of ng-click
but it needs to be tested on touch devices and there might be a usability issue as well.
Haki.
My quick fix is to increase the debounce_blur.. fingers crossed:
<span mass-autocomplete="{debounce_blur:700}">
<input ng-model="dirty.value"
mass-autocomplete-item="autocomplete_options"
placeholder="University or Domain">
</span>