Bug Tracker

Opened 6 years ago

Closed 6 years ago

#13799 closed bug (notabug)

.off() doesn't remove event listener

Reported by: anonymous Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.9.1
Keywords: Cc:
Blocked by: Blocking:

Description

$input.off('kreypress', press).on('keypress', press);
$input.off('kreypress', press).on('keypress', press);

Executing this code will trigger press() method twice. Demo.

Change History (1)

comment:1 Changed 6 years ago by m_gol

Resolution: notabug
Status: newclosed

You made a typo in the test... http://jsfiddle.net/m_gol/cpmVQ/1/

Note: See TracTickets for help on using tickets.