mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-18 04:39:14 +00:00
Merge pull request #5747 from mbudm/issue/5434
Make keyboard UI close on iOS when done searching
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
Darkswarm.directive "disableEnterWithBlur", ()->
|
||||
# Stops enter from doing normal enter things, and blurs the input
|
||||
restrict: 'A'
|
||||
link: (scope, element, attrs)->
|
||||
element.bind "keydown keypress", (e)->
|
||||
code = e.keyCode || e.which
|
||||
if code == 13
|
||||
element.blur()
|
||||
e.preventDefault()
|
||||
Reference in New Issue
Block a user