Fix Issue 400 (trunk): spinner problem when mousing out while still pressed

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1193 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Jeff Schiller 2010-01-12 07:56:38 +00:00
parent 76a9459fe8
commit 5a063726d0
1 changed files with 3 additions and 1 deletions

View File

@ -138,10 +138,12 @@ $.fn.SpinButton = function(cfg){
// Reset up/down buttons to their normal appearance when mouse moves away:
$(this).removeClass(this.spinCfg.upClass).removeClass(this.spinCfg.downClass);
this.spinCfg._direction = null;
window.clearInterval(this.spinCfg._repeat);
window.clearTimeout(this.spinCfg._delay);
})
.mousedown(function(e){
if (this.spinCfg._direction != 0) {
if ( e.button === 0 && this.spinCfg._direction != 0) {
// Respond to click on one of the buttons:
var self = this;
var adjust = function() {