title: 'Error: [$rootScope:inprog] $apply already in progress' when selecting a value from dropdown, after migrating from v1.2 to v1.6
body: <p>After migrating our AngularJS application from v1.2.9 to v1.6.9, whenever I click on any dropdown option, I get error in developer console stating </p>
  
  <blockquote>
    <p>'Error: [$rootScope:inprog] $apply already in progress'</p>
  </blockquote>
  
  <p>I have tried using $timeout solution and it solves the issue for some cases(where $apply was used). However, this specific issue occurs when I am clicking on a dropdown option. I have not called $apply anywhere in my code. I tried using the ng-options in select tag too, however the issue still occurs.</p>
  
  <pre><code>Select tag that gives issue:
  &lt;select name="task" id="task" ng-model="search.task"&gt;
      &lt;option data-ng-repeat="each in taskList" value="{{each.id}}"
              ng-selected="each.id==search.task"&gt;
        {{each.taskName}}
      &lt;/option&gt;
  &lt;/select&gt;
  
  Code changes after using ng-options:
  &lt;select ng-model="search.task" ng-options="each for each in taskList"&gt;
      &lt;option value=""&gt;Task Type&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/1rXx1.png" rel="nofollow noreferrer">Please follow link for complete error stack</a></p>
  
  <p><img src="https://i.stack.imgur.com/1rXx1.png" alt=""></p>
  
  <blockquote>
    <p>Error: [$rootScope:inprog] $apply already in progress
    <a href="http://errors.angularjs.org/1.6.9/$rootScope/inprog?p0=%24apply" rel="nofollow noreferrer">http://errors.angularjs.org/1.6.9/$rootScope/inprog?p0=%24apply</a></p>
  </blockquote>
  
  <p>How do I fix this error? Any help/pointer is much appreciated.</p>