This question is locked. New answers and comments are not allowed.
I couldn't find where the numeric textbox supported mousewheel support, and I wanted mine to be able to handle:
I added the following to the telerik.textbox.min.js and all seems good :)
original section:
Modified to:
Added the following to the prototype section of the code:
Hopefully someone else can use or it will make its way into the next version. Thank you Telerik for providing the MVC code under OpenSource! I for one appreciate it.
I added the following to the telerik.textbox.min.js and all seems good :)
original section:
| value: (i || this.text) }).bind({ |
| blur: b.delegate(this, this.blur), |
| focus: b.delegate(this, this.focus), |
| keydown: b.delegate(this, this.keydown), |
| keypress: b.delegate(this, this.keypress), |
| change: function (m) |
| { |
| m.stopPropagation(); |
| return false |
| } |
| }).bind(f, b.delegate(this, this[f])).insertAfter(h); |
| var k = c(".t-arrow-up, .t-arrow-down", g).bind({ |
| mouseup: b.delegate(this, this.clearTimer), |
| mouseout: b.delegate(this, this.clearTimer), |
| click: b.preventDefault, |
| dragstart: b.preventDefault, |
| dblclick: b.delegate(this, this.clearTimer) |
| value: (i || this.text) }).bind({ |
| blur: b.delegate(this, this.blur), |
| focus: b.delegate(this, this.focus), |
| keydown: b.delegate(this, this.keydown), |
| keypress: b.delegate(this, this.keypress), |
| mousewheel: b.delegate(this, this.mouseWheel), |
| DOMMouseScroll: b.delegate(this, this.mouseWheel), |
| change: function (m) |
| { |
| m.stopPropagation(); |
| return false |
| } |
| }).bind(f, b.delegate(this, this[f])).insertAfter(h); |
| var k = c(".t-arrow-up, .t-arrow-down", g).bind({ |
| mouseup: b.delegate(this, this.clearTimer), |
| mouseout: b.delegate(this, this.clearTimer), |
| click: b.preventDefault, |
| dragstart: b.preventDefault, |
| mousewheel: b.delegate(this, this.mouseWheel), |
| DOMMouseScroll: b.delegate(this, this.mouseWheel), |
| dblclick: b.delegate(this, this.clearTimer) |
| mouseWheel: function (event) |
| { |
| if (this.focus) |
| { |
| var delta; |
| var rawEvent = event; |
| if (rawEvent.wheelDelta) { |
| // IE and Opera use wheelDelta, which is a multiple of 120 (possible values -120, 0, 120). |
| delta = rawEvent.wheelDelta / 120; |
| // In Opera, value is negated. |
| //if (Sys.Browser.agent === Sys.Browser.Opera) delta = -delta; |
| } |
| else if (rawEvent.detail) { |
| // Firefox uses detail property, which is a multiple of 3. |
| delta = -rawEvent.detail / 3; |
| } |
| if (delta > 0) |
| this.stepper(event,1); |
| else if (delta < 0) |
| this.stepper(event,-1); |
| this.clearTimer(event); |
| } |
| }, |
Hopefully someone else can use or it will make its way into the next version. Thank you Telerik for providing the MVC code under OpenSource! I for one appreciate it.