Android "Go" button closes modal window


#1

We have a form in a modal window. The first field is input type=“text”. When you type in there with and Android device you get the “go” button in the bottom right of the keyboard. Clicking on Go shuts the entire modal window. I tried to intercept by putting an ng-submit on the form that points to a validation function. I can see a flashing where it performs the validation but then the whole modal windows just disappears.

Anyone see this and have you come up with a workaround?


#2

Hmm, interesting…
Can you make an example of this with codepen?


#3

Does it have to be in a form at all? Ie could you use an Ng-click event which will then ignore the keyboard Go?


#4

Here is a codepen. This reproduces on both IOS and Android - click in the title input, then click “GO” on the keyboard. The entire modal is dismissed.


#5

So in you’re case, be cause we you using buttons inside you’re form, they were being executed. Changing them to a works fine

https://docs.angularjs.org/api/ng/directive/form


#6

Ahah. That works. Thanks!