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

MAGE-3 Checking on exists element fix #1516

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

sgeleon
Copy link

@sgeleon sgeleon commented May 24, 2024

When we have a dynamically element #algolia-search-box, we will get error when this element doesn't exists in DOM on the moment when we try to get him, this fix check it.

view/frontend/web/internals/common.js

 var input = $(this).closest('#algolia-searchbox').find('input');

            input.val('');
            **input.length ?  input.get(0)?.dispatchEvent(new Event('input')) : null**

            handleInputCrossAutocomplete(input);

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