Skip to content

Commit 0adedc0

Browse files
committed
add list of supported HTML 5 types for auto size feature, refs #45, #39, #20
1 parent 34b3187 commit 0adedc0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/angular-advanced-searchbox.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,8 @@ angular.module('angular-advanced-searchbox', [])
328328
model: '=ngModel'
329329
},
330330
link: function($scope, $element, $attrs) {
331-
if($parse($attrs.type !== 'text'))
331+
var supportedInputTypes = ['text', 'search', 'tel', 'url', 'email', 'password', 'number'];
332+
if(supportedInputTypes.indexOf($element[0].type || 'text') === -1)
332333
return;
333334

334335
var container = angular.element('<div style="position: fixed; top: -9999px; left: 0px;"></div>');

0 commit comments

Comments
 (0)