Bug Tracker

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#14241 closed bug (notabug)

jQuery.one runs multiple times when assigned with multiple event types

Reported by: [email protected] Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.10.2
Keywords: Cc:
Blocked by: Blocking:


When you use jQuery.one with multiple event types, the handler can end up being triggered multiple times. I'm not sure if that's expected behaviour or not, but I thought the idea for jQuery.one was the handler could only be called once?

Anyway, you can find a test case http://jsfiddle.net/nathggns/UPAW8/3/

If the bug were to be fixed, I think the counter should never go above 1.

Change History (5)

comment:1 Changed 10 years ago by scottgonzalez

Resolution: notabug
Status: newclosed

You're saying bind two event handlers: A click and mouseenter, each of which can only run once. I've filed a docs issue to clarify: https://github.com/jquery/api.jquery.com/issues/352

comment:2 Changed 10 years ago by anonymous

Yes, I thought it could be a docs issue. Maybe it might be worth creating a function that will only call the handler once regardless of how many event types you assign it to.

comment:3 Changed 10 years ago by scottgonzalez


Please ask for help on the forums, IRC, or Stack Overflow.

comment:4 Changed 10 years ago by dmethvin

#14240 is a duplicate of this ticket.

comment:5 Changed 10 years ago by dmethvin

#14239 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.