Firefox select dropdown keeps refreshing/reverting to default option due to running Javascript - AngularJS

后端 未结 4 1560
醉梦人生
醉梦人生 2021-02-12 22:52

I\'m building an app in AngularJS and am having trouble with select dropdown menus when using Firefox.

When I click a select menu and hover over the options, it resets

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-12 23:31

    It seems like the creating the 'option' elements through ng-options is the root cause to this issue.

    I've altered the code a bit to make sure if that's the problem

    See the plunkr

    http://plnkr.co/edit/DLf2wvVGXRiwci6FhqQO?p=preview

    What I've done is to move the creation logic of the options to ng-repeat. That'll fix the issue for now.

提交回复
热议问题