-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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 keyboard arrow keys behavior for number fields in AdobeStock grid #26029
Fixed keyboard arrow keys behavior for number fields in AdobeStock grid #26029
Conversation
Hi @rogyar. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
Hi @sivaschenko. Please, take a look at this one when you will have a chance. Thank you! |
Hi @lbajsarowicz, thank you for the review.
|
✔️ QA passed |
@rogyar please cover your fix with unit test. |
@rogyar I think is the best way to cover it with jasmine test, https://devdocs.magento.com/guides/v2.3/test/js/jasmine.html |
@rogyar thanks for the fix! As it was already brought up the code should be covered by tests. I think that MFTF test would work the best for this fix (any grid in magento2 if it's possible to modulate the circumstances causing the bug, otherwise the test can be added to Adobe Stock Integration). Please let me know if you need help with covering this fix with tests. |
Hi @sivaschenko. Thank you for your suggestion. In order to test this fix globally, I've created a unit test based on Jasmine instead of MFTF. |
Hi @rogyar thanks for the test, this PR is ready to be approved once Static Tests will be fixed |
Hi @sivaschenko. All green 👌 |
Hi @sivaschenko, thank you for the review. |
✔️ QA passed |
Hi @rogyar, thank you for your contribution! |
Description (*)
This PR introduces a fix for keyboard arrow keys in
<input type="number"/>
of AdobeStock grid.Technical background
The jsTree (that is used for media gallery directory tree) hotkeys plugin conflicts with
<input type="number"/>
. The plugin works well with most input types but overtakes keyboard cursors control from the number type. Basically, if we have jsTree with hotkeys plugin enabled and<input type="number"/>
on the same page, the keyboard cursor buttons will be handled by jsTree when any of the<input type="number"/>
is focused.If you take a look at the modified file, there were similar "hotfixes" previously but the "number" type has not been taken into consideration.
Fixed Issues (if relevant)
Manual testing scenarios (*)
The AdobeStock plugin needs to be installed and configured.
The cursor should be moved in order to edit the page number. Please, refer to the original issue to see the "bugged" behavior.
Please note, there's one more issue with arrow keys behavior for input fields that is not connected to the current one somehow. It's fixed in #25991