I am using Jquery-Knob as a control knob to choose values from an array, I use the input as the index of the array and I show other info as the label.
$(".dial").knob({
displayPrevious : true,
'min':0,
'max': this.arrayList.length -1,
'format' : (knobText)=>{
if( isNaN(knobText) ){
return knobText;
}
return this.arrayList[knobText].name;
},
'change' : (knobValue)=>{
// Get the new user index
console.dir("currentKnobIndex: " + Math.floor(knobValue));
this.currentKnobIndex = Math.floor(knobValue);
}
});
I works good except when I click on the knob label and it get focus to manually write a value. Is there a way to prevent this? The user should just be able to change the values with the mouse/touch. I tried adding "readonly" but it disables for complete the knob.