Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Model not updating when dynamic select element is manipulated via arrow keys #7042

@RodolpheGohard

Description

@RodolpheGohard

Steps

  1. have a select which all options are generated from ng-options
  2. focus the select (but do not select any option yet)
  3. type "T"
  4. type "T" again

What should happen?
at step 3, the model should be "TN"
at step 4, the model should change to "TX"

What happens and should not?
at step 4, the model stays to "TX"

Environment
Chrome 33 , angular 1.2 or beta 1.3

demonstration (taken from #2230):
http://jsfiddle.net/ADukg/5116/
or http://plnkr.co/edit/2R9YM6KF01bye4kPeoZL?p=preview

work around

  1. hard code the empty item <option value="" /> inside the select
  2. trigger a change event on keystrokes: $(document).on( 'keyup', 'select', function(){$(this).trigger('change')} );

related

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions