javascript - Focus() is not working in ionic using ios 10 safari browser -


focus() not working in ionic using ios 10 safari browser.

it works when use chrome emulator not when use ios 10 safari browser.

below code i'm using focus element.

var rvmobileapp = angular.module('rvmobileapp.shared.directive'); rvmobileapp.directive('rvsetfocus', function ($timeout) {    return {            link: function (scope, element, attrs) {             $timeout(function () {                element[0].focus();            }, 100);         } }; 

thanks in advance..

by default ios not allow keyboard interaction except when input field tapped.

to override this, need put in config.xml:

<preference name="keyboarddisplayrequiresuseraction" value="false" /> 

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -