Bug Tracker

Ticket #11222 (closed bug: duplicate)

Opened 3 years ago

Last modified 3 years ago

Toggle quick-click breaks display attribute.

Reported by: anonymous Owned by:
Priority: high Milestone: None
Component: effects Version: 1.7.1
Keywords: Cc:
Blocking: Blocked by:

Description

Issue

When the .toggle() function is triggered via a CLICK event, and the end-user triggers the CLICK event TWICE (double-click):

a) The animation continues until the end b) The toggle is no longer effective

Testcase

When the CLICK event is only triggered ONCE when the animation is NOT running the .toggle() behaviour runs as expected.

Conclusion

My personal fix was to use the .data() setting a Boolean flag which stated the animation status.

  1. Before the .toggle() was executed I set .data("animating", true)
  2. Within the .toggle() callback method I set .data("animating", false)
  3. Before I trigger the .toggle() I place a condition based on the value of "animating", therefore this prevents the issue.

Nevertheless I would have expected this behaviour be default from the Core.

Example

 http://jsfiddle.net/__itsash/m3fwP/

Change History

comment:1 Changed 3 years ago by timmywil

  • Priority changed from undecided to high
  • Resolution set to duplicate
  • Status changed from new to closed
  • Component changed from unfiled to effects
  • Type changed from feature to bug

This has been fixed.  http://jsfiddle.net/m3fwP/2/

comment:2 Changed 3 years ago by timmywil

Duplicate of #10848.

Note: See TracTickets for help on using tickets.