Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mini search field looses focus after its JavaScript is initialized #13988

Closed
krzksz opened this issue Mar 7, 2018 · 4 comments · Fixed by #14180
Closed

Mini search field looses focus after its JavaScript is initialized #13988

krzksz opened this issue Mar 7, 2018 · 4 comments · Fixed by #14180
Assignees
Labels
Fixed in 2.1.x The issue has been fixed in 2.1 release line Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@krzksz
Copy link
Contributor

krzksz commented Mar 7, 2018

Preconditions

  1. Any Magento 2.x.x installation, e.g. http://magento2-demo.nexcess.net/

Steps to reproduce

  1. Open Magento 2 shop.
  2. Focus mini search field before JavaScript manages to load and optionally start writing some query there.

Expected result

  1. The focus is maintained when the component is initialized.

Actual result

  1. After mini search component's JavaScript loads and initializes, search input loses focus and user has to focus it again.

As far as I understand this part of the code is responsible for above behavior:


I suspect it was added to correctly toggle active classes attached to focus event by forcing the user to reselect input field. I'm creating PR which will make code check current active element and triggers setActiveState method if it is our component's input.

@magento-engcom-team magento-engcom-team added Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed labels Mar 7, 2018
@magento-engcom-team
Copy link
Contributor

@krzksz, thank you for your report.
We've acknowledged the issue and added to our backlog.

@magento-engcom-team magento-engcom-team added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Mar 7, 2018
@rogyar rogyar self-assigned this Mar 11, 2018
@magento-engcom-team
Copy link
Contributor

Hi @krzksz. Thank you for your report.
The issue has been fixed in #13989 by @krzksz in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming 2.2.5 release.

@magento-engcom-team
Copy link
Contributor

Hi @krzksz. Thank you for your report.
The issue has been fixed in #14180 by @mastiuhin-olexandr in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.0 release.

@sidolov
Copy link
Contributor

sidolov commented Jul 25, 2018

Hi @krzksz. Thank you for your report.
The issue has been fixed in #17086 by @mageprince in 2.1-develop branch
Related commit(s):

The fix will be available with the upcoming 2.1.15 release.

@sidolov sidolov added the Fixed in 2.1.x The issue has been fixed in 2.1 release line label Jul 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.1.x The issue has been fixed in 2.1 release line Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants