-
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
Fixing #10275 keyboard submit of adminhtml suggest form. #11250
Fixing #10275 keyboard submit of adminhtml suggest form. #11250
Conversation
6c84240
to
956fe08
Compare
956fe08
to
eefdc1c
Compare
Hmmm the test which failed seems to have nothing related with my PR :
What should I do now since I cannot restart the Travis build by myself @ishakhsuvarov ? |
@romainruaud You can close and re-open the PR. This will trigger a new Travis build. |
Travis timed out this time... I close/open to trigger again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check the code review suggestions and consider covering this behavior update with the test
lib/web/mage/backend/suggest.js
Outdated
@@ -245,6 +245,20 @@ | |||
|
|||
case keyCode.ENTER: | |||
case keyCode.NUMPAD_ENTER: | |||
suggestList = event.currentTarget.parentNode.getElementsByTagName('ul')[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any specific reason not to use jQuery for this purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ishakhsuvarov you are right, I could have used jQuery, but vanillaJS does good also for things like this, and the rest of the file is retrieving elements via the same syntax, so I remained consistent.
lib/web/mage/backend/suggest.js
Outdated
|
||
if (hasSelectedItems) { | ||
selectedItem = $(suggestList.getElementsByClassName('_active')[0]); | ||
/* eslint-disable max-depth */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not encourage suppressing warnings from linters. Please consider refactoring this part accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ishakhsuvarov Yep, I will move this part into a dedicated function I guess.
Hi @romainruaud |
@ishakhsuvarov I was in holidays sorry. I fix the changes ASAP |
@ishakhsuvarov done |
@romainruaud Thank you! |
…to2 into fix_admin-search-menu
[EngCom] Public Pull Requests - 2.2-develop - MAGETWO-82724 Allow coupon code with special charater to be applied to order in checkout #11710 - MAGETWO-82675 Add a health check to the NGINX configuration sample #11690 - MAGETWO-82562 Coupon codes not showing in invoice #11635 - MAGETWO-82535 Fixed ability to set field config from layout xml #11302 [backport 2.2] #11643 - MAGETWO-81146 Fixing #10275 keyboard submit of adminhtml suggest form. #11250 - MAGETWO-82761 [Backport 2.2-develop] Dashboard Fix Y Axis for range #11751 - MAGETWO-82748 Fix Notice: freePackageValue is undefined #11720 - MAGETWO-82747 [TASK] Updated user.ini according to Magento DevDocs #11734 - MAGETWO-82537 MAGETWO-81311: Check the length of the array before attempting to sli… #11637 - MAGETWO-81970 Add missing translations in Magento_UI #11440 - MAGETWO-81904 FIX #11022 in 2.2-develop: Filter Groups of search criteria parameter have not been included for further processing #11421 - MAGETWO-82179 Fix Filter Customer Report Review 2.2-develop [Backport] #11522
This is a fix for #10275
Description
Pressing ENTER when navigating through admin suggest now work as expected.
Fixed Issues (if relevant)
Manual testing scenarios
Contribution checklist