Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#21531 closed defect (bug) (fixed)

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

Reported by: jayjdk's profile Jayjdk Owned by: lancewillett's profile lancewillett
Milestone: 3.5 Priority: normal
Severity: minor Version:
Component: Bundled Theme Keywords: has-patch
Focuses: 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 12 years ago.

Download all attachments as: .zip

Change History (6)

@Jayjdk
12 years ago

#1 @Jayjdk
12 years ago

  • Summary changed from Twenty Twelve: to Twenty Twelve: Navigation queue build up

#2 @Jayjdk
12 years ago

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

#3 @lancewillett
12 years ago

  • 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?

#4 @lancewillett
12 years ago

  • 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.

#5 @Jayjdk
12 years ago

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.