html - Issues with input and Crosswalk -
i have trouble crosswalk input text.
when write , delete it, input doesn't clear totally. when write again old text appears in input...
for exemple when write "cordova" , delete word, , write "is best", after writing "is the" gives me "is cordovabest".
i didn't have issue before installing crosswalk. solution ?
i had same issues , used directive (just made now, not tested extensively). on emptying of input creates new input focus on (just blur(ing) didn't much), re-focuses on original input:
angular.module('yourmodule') .directive('autocomplete', function($timeout) { return { restrict: 'a', scope: { autocomplete: '=' }, link: function(scope, element, attrs) { function createinputfocus(origfield) { origfield.blur(); var field = document.createelement('input'); field.setattribute('type', 'text'); document.body.appendchild(field); $timeout(function() { field.focus(); $timeout(function() { field.blur(); document.body.removechild(field); $timeout(function() { origfield.focus(); }, 100); }, 100); }); } if (attrs.autocomplete === 'off') { element[0].addeventlistener('keyup', function(e) { if (element[0].value !== undefined && !element[0].value.length) { createinputfocus(element[0]); } return false; }); } } }; });
<input autocomplete="off">
seems trick me!
Comments
Post a Comment