Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit 7ef10d4

Browse files
CMirceaaaronroberson
authored andcommitted
feature(touch): set clickTriggeredSelect to true for touchend events
Setting clickTriggeredSelect to true for "touchend" events fixes an issue I've encoutered when using this property in a search box (using ui-select-match and ui-select-choices), where we couldn't distinguish typing from clicking on an autocomplete result on mobile devices.
1 parent f3194bf commit 7ef10d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/uiSelectController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ uis.controller('uiSelectCtrl',
381381
if (!item || !_isItemDisabled(item)) {
382382
// if click is made on existing item, prevent from tagging, ctrl.search does not matter
383383
ctrl.clickTriggeredSelect = false;
384-
if($event && $event.type === 'click' && item)
384+
if($event && ($event.type === 'click' || $event.type === 'touchend') && item)
385385
ctrl.clickTriggeredSelect = true;
386386

387387
if(ctrl.tagging.isActivated && ctrl.clickTriggeredSelect === false) {

0 commit comments

Comments
 (0)