Skip to content

Commit f88fa71

Browse files
author
Burning Gramma
committed
Fixes input tag issue in webkit-focus-workaround.
1 parent efccc19 commit f88fa71

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/textAngular.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ See README.md or https://github.com/fraywing/textAngular/wiki for requirements a
2828
if(!isEditable){
2929
document.getElementById('textAngular-editableFix-010203040506070809').setSelectionRange(0, 0); // set caret focus to an element that handles caret focus correctly.
3030
curelement.focus(); // focus the wanted element.
31+
if (curelement.select) {
32+
curelement.select(); // use select to place cursor for input elements.
33+
}
3134
}
32-
}
35+
}
3336
globalContentEditableBlur = false;
3437
}, false); // add global click handler
3538
angular.element(document).ready(function () {

0 commit comments

Comments
 (0)