Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(autocomplete): fixes issue in Firefox/Linux where textChange is n…
Browse files Browse the repository at this point in the history
…ot a function
  • Loading branch information
Robert Messerle committed Jun 16, 2015
1 parent 1abc08b commit 1be46cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/autocomplete/js/autocompleteController.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ function MdAutocompleteCtrl ($scope, $element, $mdUtil, $mdConstant, $timeout, $
if (searchText !== getDisplayValue($scope.selectedItem)) $scope.selectedItem = null;
else return;
//-- trigger change event if available
if ($scope.textChange && searchText !== previousSearchText)
if (angular.isFunction($scope.textChange) && searchText !== previousSearchText)
$scope.textChange(getItemScope($scope.selectedItem));
//-- cancel results if search text is not long enough
if (!isMinLengthMet()) {
Expand Down

2 comments on commit 1be46cb

@r0b-
Copy link

@r0b- r0b- commented on 1be46cb Jun 16, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had same issues in chrome/win8 but seemed to be related to angular 1.4.1 ... The error disappeared with 1.4.0
Anyway Thanks!

@Fardinak
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm on chrome/linux and had this issue. The value was true (Boolean). I don't suppose any engine would simply pass by trying to execute a boolean!

Anyway, thanks for the fix. In what version are we expecting it?

Please sign in to comment.