From 3b541bc7c84748fb6ebe41e549bbd12570913533 Mon Sep 17 00:00:00 2001 From: Vitalii Dmyterko Date: Mon, 30 Nov 2015 13:35:44 +0000 Subject: [PATCH] fix issue with tagging, when mouse click on options doesn't work for angular > 1.4.x --- dist/select.js | 4 ++-- src/uiSelectController.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/select.js b/dist/select.js index 6349bae30..807251357 100644 --- a/dist/select.js +++ b/dist/select.js @@ -1,7 +1,7 @@ /*! * ui-select * http://github.com/angular-ui/ui-select - * Version: 0.13.2 - 2015-10-09T15:34:24.040Z + * Version: 0.13.3 - 2015-11-30T12:23:16.040Z * License: MIT */ @@ -519,7 +519,7 @@ uis.controller('uiSelectCtrl', if (!item || angular.equals( ctrl.items[0], item ) ) { return; } - } else { + } else if(!$event){ //if not mouse click, that done to prevent setting value by activeIndex // keyboard nav happened first, user selected from dropdown item = ctrl.items[ctrl.activeIndex]; } diff --git a/src/uiSelectController.js b/src/uiSelectController.js index 1afccb72e..69d14c6a6 100644 --- a/src/uiSelectController.js +++ b/src/uiSelectController.js @@ -280,7 +280,7 @@ uis.controller('uiSelectCtrl', if (!item || angular.equals( ctrl.items[0], item ) ) { return; } - } else { + } else if(!$event){ //if not mouse click, that done to prevent setting value by activeIndex // keyboard nav happened first, user selected from dropdown item = ctrl.items[ctrl.activeIndex]; }