Opened 10 months ago

Closed 9 months ago

Last modified 9 months ago

#21531 closed defect (bug) (fixed)

Twenty Twelve: Stop the navigation slide animation when clicking the button multiple times

Reported by: Jayjdk Owned by: lancewillett
Priority: normal Milestone: 3.5
Component: Bundled Theme Version:
Severity: minor Keywords: has-patch
Cc:

Description

In Twenty Twelve, clicking the "Show navigation" button many times in a row causes a queue build up, where the navigation just slides up and down till it's done.

I've attached a patch that adds .stop() before .slideToggle()

"When .stop() is called on an element, the currently-running animation (if any) is immediately stopped" - http://api.jquery.com/stop/

Attachments (1)

21531.patch (477 bytes) - added by Jayjdk 10 months ago.

Download all attachments as: .zip

Change History (6)

  • Summary changed from Twenty Twelve: to Twenty Twelve: Navigation queue build up
  • Summary changed from Twenty Twelve: Navigation queue build up to Twenty Twelve: Stop the navigation slide animation when clicking the button multiple times
  • Milestone changed from Awaiting Review to 3.5

Thanks for the report. Just for the sake of clarity, can you share how you debugged the queue build-up -- and steps to repeat it exactly?

  • Owner set to lancewillett
  • Resolution set to fixed
  • Status changed from new to closed

In [21519]:

Twenty Twelve: stop nav slide animation when clicking the button multiple times in a row. Props Jayjdk, fixes #21531.

I'm not sure that you're asking about. I noticed that the slide continued when I clicked the button multiple times. I remembered reading this article http://www.learningjquery.com/2009/01/quick-tip-prevent-animation-queue-buildup on how to prevent that.

Note: See TracTickets for help on using tickets.