MassAutocomplete icon indicating copy to clipboard operation
MassAutocomplete copied to clipboard

Long press on menu item cause detach and the item is not selected

Open hakib opened this issue 10 years ago • 1 comments

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.

hakib avatar Dec 13 '14 17:12 hakib

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>

robert-king avatar May 14 '15 05:05 robert-king