diff --git a/demos/autocomplete/multiple-remote.html b/demos/autocomplete/multiple-remote.html index 5e0f4b50b7a..2046db61452 100644 --- a/demos/autocomplete/multiple-remote.html +++ b/demos/autocomplete/multiple-remote.html @@ -45,6 +45,13 @@ // add placeholder to get the comma-and-space at the end terms.push(""); this.value = terms.join(", "); + if ( document.selection ) { + this.focus(); + var range = document.selection.createRange(); + range.moveStart( 'character', this.value.length ); + range.moveEnd( 'character', 0 ); + range.select(); + } return false; } }); diff --git a/demos/autocomplete/multiple.html b/demos/autocomplete/multiple.html index 908cfe6ce7a..d8cb7e403af 100644 --- a/demos/autocomplete/multiple.html +++ b/demos/autocomplete/multiple.html @@ -39,6 +39,13 @@ // add placeholder to get the comma-and-space at the end terms.push(""); this.value = terms.join(", "); + if ( document.selection ) { + this.focus(); + var range = document.selection.createRange(); + range.moveStart( 'character', this.value.length ); + range.moveEnd( 'character', 0 ); + range.select(); + } return false; } });