Bug Tracker

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#11222 closed bug (duplicate)

Toggle quick-click breaks display attribute.

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

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 (2)

comment:1 Changed 5 years ago by timmywil

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

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

comment:2 Changed 5 years ago by timmywil

Duplicate of #10848.

Note: See TracTickets for help on using tickets.