I’d like mobile users to be able to both perform the search AND close the keyboard by pressing the enter key, as they can on other sites, but we haven’t been able to figure out how to do it, or if it’s possible. We tried using a form for input instead, but that didn’t render at all.
No, I haven’t solved this yet. The root issue seems to be that the event object doesn’t exist on mobile. So when I add @keyup.enter="alert(event.keyCode)" to my input object, I don’t get an alert on mobile devices, but I do on Desktop.
Taking that logic a step further, I should be able to access the event in my named action by passing it in: @keyup="namedAction('search',{event})". But again, event only exists on desktop and is undefined on mobile.
This might explain why @keyup.enter doesn’t work on Android, although I’ve gotten the same results on iOS as well, and this issue doesn’t mention iOS: https://github.com/vuejs/vue/issues/7651
It also doesn’t explain why the event does exist on mobile.
BF Docs say otherwise and the format from the docs does work on Desktop.
If you could share a working code snippet of passing a keyup or keypress event into a named action, which works on mobile, I’d appreciate it since I cannot get it to work (using bf-latest).