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

fixed issue #22736 - Cursor position not in right side of search keyword in mobile #22795

Merged
merged 4 commits into from
May 23, 2019

Conversation

ghost
Copy link

@ghost ghost commented May 8, 2019

Description (*)

For mobile view when search is focused I have set with only found solution https://www.google.com/search?q=jquery+set+cursor+at+end+of+input

Fixed Issues (if relevant)

  1. Cursor position not in right side of search keyword in search box when click on search again (Mobile issue) #22736:
    Cursor position not in right side of search keyword in search box when click on search again (Mobile issue)

Manual testing scenarios (*)

  1. Load website in mobile view
  2. Search anything.
  3. Click on search icon to focus search box
  4. Check the cursor position

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@m2-assistant
Copy link

m2-assistant bot commented May 8, 2019

Hi @sanjaychouhan-webkul. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me 2.3-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

Copy link
Contributor

@VladimirZaets VladimirZaets left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sanjaychouhan-webkul, this can get even simpler: this.element.focus().val(this.element.val())

@ghost ghost assigned VladimirZaets May 8, 2019
@VladimirZaets VladimirZaets self-requested a review May 8, 2019 18:29
Copy link
Contributor

@VladimirZaets VladimirZaets left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sanjaychouhan-webkul, this can get even simpler: this.element.focus().val(this.element.val())

@ghost
Copy link
Author

ghost commented May 8, 2019

@VladimirZaets this does not work. also getting js error because we are triggering focus() event inside onFocus event handler.
Screenshot from 2019-05-09 00-52-06we

@ghost ghost requested a review from VladimirZaets May 8, 2019 19:29
@ghost
Copy link
Author

ghost commented May 9, 2019

@VladimirZaets also this.element.val(this.element.val()); doesn't work.

@magento-engcom-team
Copy link
Contributor

Hi @VladimirZaets, thank you for the review.
ENGCOM-5126 has been created to process this Pull Request

@@ -133,6 +133,9 @@ define([

if (this.isExpandable) {
this.element.attr('aria-expanded', isActive);
let searchValue = this.element.val();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sanjaychouhan-webkul.
Currently, we support only ES5 syntax, so can you please change let to var and according to our technical guidelines variables declaration should be on the top of the function.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VladimirZaets I have applied the changes

@ghost ghost requested a review from VladimirZaets May 18, 2019 03:33
@magento-engcom-team
Copy link
Contributor

Hi @VladimirZaets, thank you for the review.
ENGCOM-5126 has been created to process this Pull Request

@soleksii
Copy link

✔️ QA Passed

Before:

before

After:

after

@m2-assistant
Copy link

m2-assistant bot commented May 23, 2019

Hi @sanjaychouhan-webkul, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants