We've implemented a series of hover cards that are triggered by a MouseEnter event. Despite adding timeouts to these, the hover card still shows even when just touching for a millisecond. More specifically is that if I was scrolling past the item and the mouse cursor hit it, the popup would still occur half a second later. I want to be able to scroll past an item without the popup happening by accident.
Here is the code:
function onShowHoverCardHover(event) {
$timeout.cancel(timeoutShow);
$timeout.cancel(timeoutHide);
timeoutShow = $timeout(function() {
createHoverCard().then(function() {
$timeout(function() {
// alert('show timeout');
var _$hc = getHoverCard();
repositionHoverCard();
updateAlignments();
if (!isVisible) {
_$hc.addClass('show');
isVisible = true;
}
}.bind(this), 500);
}.bind(this));
}.bind(this), showTimeout);
}