diff options
author | jzaefferer <joern.zaefferer@gmail.com> | 2010-06-23 16:44:11 +0200 |
---|---|---|
committer | jzaefferer <joern.zaefferer@gmail.com> | 2010-06-23 16:44:11 +0200 |
commit | 965dddd9818f7f24ec63666da356248a1c010636 (patch) | |
tree | 665137739996cfbbac48ffd418dfa19c95dbdda2 /demos | |
parent | 496b40802b150057da0544382b6a14a78404b0fc (diff) | |
download | jquery-ui-965dddd9818f7f24ec63666da356248a1c010636.tar.gz jquery-ui-965dddd9818f7f24ec63666da356248a1c010636.zip |
Autocomplete: Update cursor position in multiple demos in IE. Fixes #5761 - Autocomplete: multiple demos need extra IE handling for cursor position
Diffstat (limited to 'demos')
-rw-r--r-- | demos/autocomplete/multiple-remote.html | 7 | ||||
-rw-r--r-- | demos/autocomplete/multiple.html | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/demos/autocomplete/multiple-remote.html b/demos/autocomplete/multiple-remote.html index 5e0f4b50b..2046db614 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 908cfe6ce..d8cb7e403 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; } }); |