Skip to content

HoverInit delay 0 does not trigger hoverenter if immediately moused out #57

@justinbmeyer

Description

@justinbmeyer

If I have code like:

hoverinit: function(){
  this.delay(0)
  $("#someelement").show();
}.
hoverenter: function(){
  console.log("Called")
}

where #someelement hides the to-be-hovered element, a mouseleave is immediately triggered before the hovered flag is set.

If the user is setting delay to 0, they most likely want to be using leave this.leave(2000) and want a hoverenter no matter what.

The fix is to recognize this as a special case and always fire hoverenter and set hovered to true.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions