From 5621c4481748788d2ae3c6fbf116217c605e642c Mon Sep 17 00:00:00 2001 From: sanjay Date: Wed, 8 May 2019 22:52:36 +0530 Subject: [PATCH 1/4] fixed issue #22736 - Cursor position not in right side of search keyword in mobile --- app/code/Magento/Search/view/frontend/web/js/form-mini.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/Search/view/frontend/web/js/form-mini.js b/app/code/Magento/Search/view/frontend/web/js/form-mini.js index 5331ba3b447ac..f4ee8e51ab31d 100644 --- a/app/code/Magento/Search/view/frontend/web/js/form-mini.js +++ b/app/code/Magento/Search/view/frontend/web/js/form-mini.js @@ -133,6 +133,9 @@ define([ if (this.isExpandable) { this.element.attr('aria-expanded', isActive); + let searchValue = this.element.val(); + this.element.val(""); + this.element.val(searchValue); } }, From 3ca7c02c826c61d87cfd39cee535eb382368bfb9 Mon Sep 17 00:00:00 2001 From: sanjay Date: Sat, 18 May 2019 09:00:35 +0530 Subject: [PATCH 2/4] changed according to guidelines --- app/code/Magento/Search/view/frontend/web/js/form-mini.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Search/view/frontend/web/js/form-mini.js b/app/code/Magento/Search/view/frontend/web/js/form-mini.js index f4ee8e51ab31d..b3963f0d984ba 100644 --- a/app/code/Magento/Search/view/frontend/web/js/form-mini.js +++ b/app/code/Magento/Search/view/frontend/web/js/form-mini.js @@ -128,12 +128,13 @@ define([ * @param {Boolean} isActive */ setActiveState: function (isActive) { + var searchValue; this.searchForm.toggleClass('active', isActive); this.searchLabel.toggleClass('active', isActive); if (this.isExpandable) { this.element.attr('aria-expanded', isActive); - let searchValue = this.element.val(); + searchValue = this.element.val(); this.element.val(""); this.element.val(searchValue); } From 3c8dcead5bd0361fddcd15efa378e2b74201ed9f Mon Sep 17 00:00:00 2001 From: Volodymyr Zaets Date: Mon, 20 May 2019 03:33:04 -0500 Subject: [PATCH 3/4] Update form-mini.js --- app/code/Magento/Search/view/frontend/web/js/form-mini.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Search/view/frontend/web/js/form-mini.js b/app/code/Magento/Search/view/frontend/web/js/form-mini.js index b3963f0d984ba..ee939c94efdd7 100644 --- a/app/code/Magento/Search/view/frontend/web/js/form-mini.js +++ b/app/code/Magento/Search/view/frontend/web/js/form-mini.js @@ -129,6 +129,7 @@ define([ */ setActiveState: function (isActive) { var searchValue; + this.searchForm.toggleClass('active', isActive); this.searchLabel.toggleClass('active', isActive); From c79e1ff6f6402b85ee79a6e640856972ba758c93 Mon Sep 17 00:00:00 2001 From: Pavel Bystritsky Date: Tue, 21 May 2019 10:29:24 +0300 Subject: [PATCH 4/4] magento/magento2#22795: Static test fix. --- app/code/Magento/Search/view/frontend/web/js/form-mini.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Search/view/frontend/web/js/form-mini.js b/app/code/Magento/Search/view/frontend/web/js/form-mini.js index ee939c94efdd7..0700806a8959d 100644 --- a/app/code/Magento/Search/view/frontend/web/js/form-mini.js +++ b/app/code/Magento/Search/view/frontend/web/js/form-mini.js @@ -129,14 +129,14 @@ define([ */ setActiveState: function (isActive) { var searchValue; - + this.searchForm.toggleClass('active', isActive); this.searchLabel.toggleClass('active', isActive); if (this.isExpandable) { this.element.attr('aria-expanded', isActive); searchValue = this.element.val(); - this.element.val(""); + this.element.val(''); this.element.val(searchValue); } },