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

Search: Instant Search cannot be opened via filter class anymore #23091

Closed
gin0115 opened this issue Feb 24, 2022 · 1 comment · Fixed by #23102
Closed

Search: Instant Search cannot be opened via filter class anymore #23091

gin0115 opened this issue Feb 24, 2022 · 1 comment · Fixed by #23102
Assignees
Labels
[Feature] Search For all things related to Search [Package] Search Contains core Search functionality for Jetpack and Search plugins [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Pri] High [Type] Bug When a feature is broken and / or not performing as intended

Comments

@gin0115
Copy link

gin0115 commented Feb 24, 2022

Impacted plugin

Jetpack

Steps to Reproduce

Using latest version

Enable Jetpack search on a website and add the link to open the modal as documented in https://jetpack.com/support/search/install-search-on-your-site/

<a href="#" class="wp-button jetpack-search-filter__link" style="width: 50px;height:46px; border-color: #c8d7e1; border-style: solid; border-width: 1px 1px 2px;">
    <svg style="fill: #2e4453;" class="gridicon gridicons-search" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g><path d="M21 19l-5.154-5.154C16.574 12.742 17 11.42 17 10c0-3.866-3.134-7-7-7s-7 3.134-7 7 3.134 7 7 7c1.42 0 2.742-.426 3.846-1.154L19 21l2-2zM5 10c0-2.757 2.243-5 5-5s5 2.243 5 5-2.243 5-5 5-5-2.243-5-5z"></path></g></svg>
</a>

A clear and concise description of what you expected to happen.

When clicking a link with the jetpack-search-filter__link class, the modal should be revealed

What actually happened

Nothing, but if you inspect the page you will see that is being triggered (both body and link attributes change, but instantly revert back to the current values).

If you look through the event listeners applied to the link, you will see there are 2.
image
One on the link and one on the window. If you remove the event handler on the window itself, it will reveal and work as expected.

Other information

After a brief chat with George Stephanis and Jeremy Herve, we concluded it's a bug in the current build as this can be seen on other sites we look after.

Operating System

Linux

OS Version

POP_OS 21.04

Browser

Chrome/Chromium, Firefox

Browser Version(s)

any

@gin0115 gin0115 added the [Type] Bug When a feature is broken and / or not performing as intended label Feb 24, 2022
@github-actions github-actions bot added the [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ label Feb 24, 2022
@jeherve jeherve added [Package] Search Contains core Search functionality for Jetpack and Search plugins [Feature] Search For all things related to Search labels Feb 24, 2022
@jeherve jeherve changed the title Search Modal not revealing Search: Instant Search cannot be opened via filter class anymore Feb 24, 2022
@bluefuton
Copy link
Contributor

Thanks for the report @gin0115!

This was a regression caused by #22690 and we have a fix ready for review in #23102.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Search For all things related to Search [Package] Search Contains core Search functionality for Jetpack and Search plugins [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ [Pri] High [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants