Skip to content

Fix condition check for mouseout event#3833

Merged
rbayet merged 1 commit intoSmile-SA:2.11.xfrom
groomershop-mt:patch-1
Apr 24, 2026
Merged

Fix condition check for mouseout event#3833
rbayet merged 1 commit intoSmile-SA:2.11.xfrom
groomershop-mt:patch-1

Conversation

@groomershop-mt
Copy link
Copy Markdown
Contributor

Currently this is causing JS errors:

self._getLastElement().hasClass is not a function. (In 'self._getLastElement().hasClass(self.options.selectClass)', 'self._getLastElement().hasClass' is undefined)

Currently this is causing JS errors:

self._getLastElement().hasClass is not a function. (In 'self._getLastElement().hasClass(self.options.selectClass)', 'self._getLastElement().hasClass' is undefined)
@rbayet
Copy link
Copy Markdown
Collaborator

rbayet commented Apr 24, 2026

Hello @groomershop-mt,

I'm not able to reproduce the error in any context (because the mouseleave event is triggered instead/before ?) but indeed, if I remove all other event handlers except the mouseenter), I can see that the event handler is not doing what is supposed to do, that is removing the selectClass indicating focus on the last element of the vertical list of all result elements if the mouse is exiting the list, for instance through that last element.

For instance, going from here
image
to there
image

Considering that our form.mini.js is heavily inspired by the Magento one, you could probably also propose a similar PR on their github (for people not using Elasticsuite)

Regards

@rbayet rbayet added the safe to test PR can be tested label Apr 24, 2026
@rbayet rbayet merged commit c9c72db into Smile-SA:2.11.x Apr 24, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test PR can be tested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants