mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Autocomplete: Update cursor position in multiple demos in IE. Fixes #5761 - Autocomplete: multiple demos need extra IE handling for cursor position
This commit is contained in:
parent
496b40802b
commit
965dddd981
@ -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;
|
||||
}
|
||||
});
|
||||
|
@ -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;
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user