javascript - AngularJs : Autofocus not working in firefox -
here simple directive autofocus :
app.directive('autofocus', function($timeout) { return { restrict: 'ac', link: function(_scope, _element) { $timeout(function(){ _element[0].focus(); }, 0); } }; });
demo : http://jsfiddle.net/ounsqcmt/55/
this directive works great in chrome doesn't work in firefox . version 36.00
idea ?
it shows warning in firefox: "use of getattributenode() deprecated. use getattribute() instead."
it seems it's internal problem in firefox, @ least 1 of warnings fixed in https://bugzilla.mozilla.org/show_bug.cgi?id=690120 . problem raised jquery warning displayed in console.
http://bugs.jquery.com/ticket/12072
but shows bug has been fixed end.
this might neither problem firefox, nor fault in jquery. might dom interface issue, due breaking changes in dom level 4 api.
Comments
Post a Comment