mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-12 23:27:48 +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()
|
||||
@@ -6,7 +6,7 @@
|
||||
type: 'search',
|
||||
placeholder: t(:products_search),
|
||||
"ng-debounce" => "200",
|
||||
"ofn-disable-enter" => true}
|
||||
"disable-enter-with-blur" => true}
|
||||
%a.clear{type: 'button', ng: {show: 'query', click: 'clearQuery()'}, 'focus-search' => true}
|
||||
= image_tag "icn-close.png"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user