Skip to content

Commit 34b3187

Browse files
committed
do not try to get the current caret position on other HTML 5 input types then "text", refs #45, #39, #20
1 parent 0d94bff commit 34b3187

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/angular-advanced-searchbox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ angular.module('angular-advanced-searchbox', [])
277277
}
278278

279279
function getCurrentCaretPosition(input) {
280-
if (!input)
280+
if (!input || input.type !== 'text')
281281
return 0;
282282

283283
// Firefox & co

0 commit comments

Comments
 (0)