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
Post a Comment