]> source.dussan.org Git - jquery-ui.git/commitdiff
Fixed slider responds to keypresses when disabled
authorRichard Worth <rdworth@gmail.com>
Fri, 17 Oct 2008 12:06:16 +0000 (12:06 +0000)
committerRichard Worth <rdworth@gmail.com>
Fri, 17 Oct 2008 12:06:16 +0000 (12:06 +0000)
ui/ui.slider.js

index d2338b5dbf9d3d81b16f768fc372a15f4597dad2..247d724521329b1351858c0676ad23df26d65577 100644 (file)
@@ -155,6 +155,9 @@ $.widget("ui.slider", {
        },
        
        _keydown: function(keyCode, handle) {
+               if (this.options.disabled)
+                       return;
+
                var k = keyCode;
                if(/(33|34|35|36|37|38|39|40)/.test(k)) {
                        var o = this.options, xpos, ypos;