mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 04:14:21 +08:00
fix(searchbar): caret moving to the end when typing
This commit is contained in:
@ -188,7 +188,9 @@ export class Searchbar extends BaseInput<string> {
|
||||
*/
|
||||
_inputUpdated() {
|
||||
const ele = this._searchbarInput.nativeElement;
|
||||
if (ele) {
|
||||
// It is important not to re-assign the value if it is the same, because,
|
||||
// otherwise, the caret is moved to the end of the input
|
||||
if (ele && ele.value !== this.value) {
|
||||
ele.value = this.value;
|
||||
}
|
||||
this.positionElements();
|
||||
|
Reference in New Issue
Block a user