From 0d53fbfd0b7651652601b3b8577225ab753aab44 Mon Sep 17 00:00:00 2001 From: Jörn Zaefferer Date: Thu, 27 Dec 2012 17:05:25 +0100 Subject: Spinner: Trigger start/spin/stop events when calling step/page methods. Fixes #8901 - Spinner does not fire start/spin/stop events when calling stepUp()/Down(), pageUp()/Down() methods --- ui/jquery.ui.spinner.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'ui/jquery.ui.spinner.js') diff --git a/ui/jquery.ui.spinner.js b/ui/jquery.ui.spinner.js index aeffe0a3e..1881c99ed 100644 --- a/ui/jquery.ui.spinner.js +++ b/ui/jquery.ui.spinner.js @@ -453,14 +453,20 @@ $.widget( "ui.spinner", { this._stepUp( steps ); }), _stepUp: function( steps ) { - this._spin( (steps || 1) * this.options.step ); + if ( this._start() ) { + this._spin( (steps || 1) * this.options.step ); + this._stop(); + } }, stepDown: modifier(function( steps ) { this._stepDown( steps ); }), _stepDown: function( steps ) { - this._spin( (steps || 1) * -this.options.step ); + if ( this._start() ) { + this._spin( (steps || 1) * -this.options.step ); + this._stop(); + } }, pageUp: modifier(function( pages ) { -- cgit v1.2.3