createAFCHInstance: get rid of old click handler before adding new one
When the panel was closed via the “X” and then reopened via the dropdown menu, it was possible for duplicate warnings to appear because the old click handler which ran setupReviewPanel() was never removed. This commit resolves that issue.
This commit is contained in:
parent
29f68565a1
commit
b3bb3c7411
@ -714,7 +714,9 @@
|
|||||||
.click( function () {
|
.click( function () {
|
||||||
// DIE DIE DIE (...then allow clicks on the launch link again)
|
// DIE DIE DIE (...then allow clicks on the launch link again)
|
||||||
$afch.remove();
|
$afch.remove();
|
||||||
$afchLaunchLink.one( 'click', createAFCHInstance );
|
$afchLaunchLink
|
||||||
|
.off( 'click' ) // Get rid of old handler
|
||||||
|
.one( 'click', createAFCHInstance );
|
||||||
} )
|
} )
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user