mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-27 06:05:19 +00:00
Disabling scroll increment/decrement on Number inputs
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
Darkswarm.directive "ofnDisableScroll", ()->
|
||||
restrict: 'A'
|
||||
|
||||
link: (scope, element, attrs)->
|
||||
element.bind 'focus', ->
|
||||
element.bind 'mousewheel', (e)->
|
||||
e.preventDefault()
|
||||
element.bind 'blur', ->
|
||||
element.unbind 'mousewheel'
|
||||
Reference in New Issue
Block a user