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 TypeError when search term does not exist on pressing Home or End button #14274 #14301

Merged
merged 3 commits into from
Mar 26, 2018

Conversation

drashmk
Copy link

@drashmk drashmk commented Mar 24, 2018

Description

this._getFirstVisibleElement() returns false if there are no elements in the search autocomplete. I added check if this._getFirstVisibleElement() does not return false before adding select class to the first element when Home or End buttons on keyboard are pressed.

Fixed Issues (if relevant)

#14274: Quick search fires error

Manual testing scenarios

1.Type a term into the quick Ajax search field (#search) that doesn't exist in the database
2. Press Home or End keyboard key
3. No TypeError: this._getFirstVisibleElement(...).addClass is not a function

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)

…ch term does not exist on pressing Home or End button magento#14274
@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Mar 24, 2018

CLA assistant check
All committers have signed the CLA.

@maghamed maghamed added the Event: distributed-cd Distributed Contribution Day label Mar 24, 2018
@magento-engcom-team magento-engcom-team merged commit a5252de into magento:2.3-develop Mar 26, 2018
magento-engcom-team pushed a commit that referenced this pull request Mar 26, 2018
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.

5 participants