From ec2080184cc5efc2cb0af30f99a1b7f54a599ea1 Mon Sep 17 00:00:00 2001 From: cherrydev Date: Tue, 2 Dec 2014 19:27:46 -0800 Subject: [PATCH] supports Angular 1.3's $touched attribute on close If the ngModel is defined and an angular version with $touched is used, the select will mark the ngModel as touched when the list closes, to make it consistent with the native select control. --- src/select.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/select.js b/src/select.js index ed9bb6d123..b6407d885a 100644 --- a/src/select.js +++ b/src/select.js @@ -422,6 +422,7 @@ // Closes the dropdown ctrl.close = function(skipFocusser) { if (!ctrl.open) return; + if (ctrl.ngModel && ctrl.ngModel.$setTouched) ctrl.ngModel.$setTouched(); _resetSearchInput(); ctrl.open = false; if (!ctrl.multiple){