aboutsummaryrefslogtreecommitdiffstats
path: root/ui/ui.spinner.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/ui.spinner.js')
-rw-r--r--ui/ui.spinner.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/ui/ui.spinner.js b/ui/ui.spinner.js
index b9fa7a1b3..cbce210e8 100644
--- a/ui/ui.spinner.js
+++ b/ui/ui.spinner.js
@@ -61,12 +61,15 @@ $.widget('ui.spinner', {
})
.bind('mouseout', function(e) {
$(this).removeClass('ui-spinner-pressed');
- self._mouseup(e);
+ if (self.timer) {
+ self._mouseup(e);
+ }
})
// mousedown/mouseup capture first click, now handle second click
.bind('dblclick', function(e) {
$(this).removeClass('ui-spinner-pressed');
self._up(e);
+ self._mouseup(e);
})
.bind('keydown.spinner', function(e) {
var KEYS = $.keyCode;
@@ -106,12 +109,15 @@ $.widget('ui.spinner', {
})
.bind('mouseout', function(e) {
$(this).removeClass('ui-spinner-pressed');
- self._mouseup(e);
+ if (self.timer) {
+ self._mouseup(e);
+ }
})
// mousedown/mouseup capture first click, now handle second click
.bind('dblclick', function(e) {
$(this).removeClass('ui-spinner-pressed');
self._down(e);
+ self._mouseup(e);
})
.bind('keydown.spinner', function(e) {
var KEYS = $.keyCode;
@@ -215,6 +221,7 @@ $.widget('ui.spinner', {
i = i || 100;
if (this.timer) {
window.clearInterval(this.timer);
+ this.timer = 0;
}
this.timer = window.setInterval(function() {
self[d](e);
@@ -227,6 +234,7 @@ $.widget('ui.spinner', {
this.counter = 0;
if (this.timer) {
window.clearInterval(this.timer);
+ this.timer = 0;
}
this.element[0].focus();
this._propagate('change', e);