Skip to content

Commit 094fb10

Browse files
authored
ENGCOM-5126: fixed issue magento#22736 - Cursor position not in right side of search keyword in mobile magento#22795
2 parents baa23de + 6f02d69 commit 094fb10

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/code/Magento/Search/view/frontend/web/js/form-mini.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,16 @@ define([
128128
* @param {Boolean} isActive
129129
*/
130130
setActiveState: function (isActive) {
131+
var searchValue;
132+
131133
this.searchForm.toggleClass('active', isActive);
132134
this.searchLabel.toggleClass('active', isActive);
133135

134136
if (this.isExpandable) {
135137
this.element.attr('aria-expanded', isActive);
138+
searchValue = this.element.val();
139+
this.element.val('');
140+
this.element.val(searchValue);
136141
}
137142
},
138143

0 commit comments

Comments
 (0)