Skip to content

Commit f1440f2

Browse files
nxtplLeaVerou
authored andcommitted
Autofocus support (LeaVerou#17138)
* Support for autofocus attribute * Update awesomplete.js
1 parent b4ad7bd commit f1440f2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

awesomplete.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,10 @@ $.create = function(tag, o) {
432432
var ref = $(val);
433433
ref.parentNode.insertBefore(element, ref);
434434
element.appendChild(ref);
435+
436+
if (ref.getAttribute("autofocus") != null) {
437+
ref.focus();
438+
}
435439
}
436440
else if (i in element) {
437441
element[i] = val;

0 commit comments

Comments
 (0)