2

my html code is

<input type="text" id="ID" ng-disabled="isDisabled" />

when my page load, focus set properly on ID field but after on click of save button again i set focus on ID field but it is not set both time "isDisabled" value is false but if i remove ng-disabled focus works properly

i set focus in my controller like

angular.element("#ID").focus();

please give me solution so that i can focus with ng-disabled

Thanks in advance

pooja shah
  • 331
  • 1
  • 4
  • 15
  • 1
    You cannot focus disabled element and anyway what would be the purpose of it? You'd have better to explain why do you need this behaviour? – A. Wolff Dec 08 '15 at 10:20
  • Possible duplicate of [How can I focus a button after its been enabled?](http://stackoverflow.com/questions/29761468/how-can-i-focus-a-button-after-its-been-enabled) – Sid M Dec 08 '15 at 10:22
  • 1
    agree with @A.Wolff that focus cannot be set on disabled element but i have to set focus when my element is enabled – pooja shah Dec 09 '15 at 11:06
  • So ask relevant question. And so, what makes it enabled? I'm not angularjs dev so i have to ask – A. Wolff Dec 09 '15 at 11:07

0 Answers0