From b979ce9a28c9251d8a6e471263434eb9f0c86f77 Mon Sep 17 00:00:00 2001 From: Sergio Vera Date: Wed, 12 May 2021 19:33:53 +0200 Subject: [PATCH] MC-41902 fix jQuery hover (#30) * MC-41902: Fix jQuery hover calls * MC-41902: Fix jQuery hover calls --- .../Magento/Swatches/view/base/web/js/swatch-renderer.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Swatches/view/base/web/js/swatch-renderer.js b/app/code/Magento/Swatches/view/base/web/js/swatch-renderer.js index 84389083447ae..d8030fc3e29f4 100644 --- a/app/code/Magento/Swatches/view/base/web/js/swatch-renderer.js +++ b/app/code/Magento/Swatches/view/base/web/js/swatch-renderer.js @@ -106,7 +106,7 @@ define([ $title = $element.find('.title'); $corner = $element.find('.corner'); - $this.hover(function () { + $this.on('mouseenter', function () { if (!$this.hasClass('disabled')) { timer = setTimeout( function () { @@ -168,7 +168,9 @@ define([ $widget.options.delay ); } - }, function () { + }); + + $this.on('mouseleave', function () { $element.hide(); clearTimeout(timer); });