Skip to content

Fix the wrong behavior of validation scroll on the iPhone X #26327

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

Conversation

iGerchak
Copy link
Contributor

@iGerchak iGerchak commented Jan 9, 2020

Description (*)

Changes from PR: #23035 added regression for validation scroll.
On the iPhone X, if try to run validation programmatically (without tap to screen), Magento doesn't scroll to the failed field.
This pull request fixes this issue.

Preconditions

  1. Magento 2.3.3
  2. iPhone X (iOS 13.3)

Manual testing scenarios

  1. Add following script to the Store view in the Admin -> Content -> Design -> Configuration -> HTML Head -> Scripts and Style Sheets
<script>
setTimeout(function () {
    jQuery('.input-text.qty:last').val('');
    jQuery('.action.update').click();
}, 5000);
</script>
  1. Add minimum 3 product to the cart
  2. Go to the Cart page and wait 5 second

Expected result

  1. Should be scrolled to the field with an error

Actual result

  1. Don't scroll to the field with an error

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 are green)

@iGerchak iGerchak requested a review from DrewML as a code owner January 9, 2020 10:14
@m2-assistant
Copy link

m2-assistant bot commented Jan 9, 2020

Hi @iGerchak. 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 give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Guide documentation.

@ihor-sviziev ihor-sviziev self-assigned this Jan 9, 2020
@ihor-sviziev ihor-sviziev added the Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests label Jan 9, 2020
@ihor-sviziev
Copy link
Contributor

I believe this can't be covered with any test

@ihor-sviziev
Copy link
Contributor

@magento give me test instance

@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev. Thank you for your request. I'm working on Magento instance for you

@ihor-sviziev
Copy link
Contributor

@magento give me 2.4-develop instance

@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev, here is your new Magento instance.
Admin access: https://pr-26327.instances.magento-community.engineering/admin
Login: admin Password: 123123q

@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev. Thank you for your request. I'm working on Magento 2.4-develop instance for you

@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev, here is your Magento instance.
Admin access: https://i-26327-2-4-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

@ihor-sviziev
Copy link
Contributor

@magento give me test instance

@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev. Thank you for your request. I'm working on Magento instance for you

@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev, here is your new Magento instance.
Admin access: https://pr-26327.instances.magento-community.engineering/admin
Login: admin Password: 123123q

@ihor-sviziev
Copy link
Contributor

ihor-sviziev commented Jan 9, 2020

I can confirm, on 2.4-develop this issue exists:
❌browser didn't scrolled to the validation failed field
image

and this PR fixes the issue, tested on my iPhone Xs:

✔browser scrolled to field where validation failed
image

@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev, thank you for the review.
ENGCOM-6569 has been created to process this Pull Request

@ghost ghost assigned ptylek Jan 10, 2020
@magento-engcom-team
Copy link
Contributor

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

@engcom-Delta engcom-Delta self-assigned this Jan 14, 2020
@engcom-Delta
Copy link
Contributor

✔️ QA passed

@engcom-Golf engcom-Golf self-assigned this Jan 15, 2020
@VladimirZaets VladimirZaets added Auto-Tests: Covered All changes in Pull Request is covered by auto-tests and removed Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests labels Jan 30, 2020
@magento-engcom-team magento-engcom-team merged commit 9d29a98 into magento:2.4-develop Feb 7, 2020
@m2-assistant
Copy link

m2-assistant bot commented Feb 7, 2020

Hi @iGerchak, 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.

8 participants