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.

select with ngKeypress = complete weirdness #4303

Closed
@jbruni

Description

@jbruni

I just want to perform something upon a keypress event in a select element.

Check what happens in this extremely simple Plunker, where a counter is incremented inside the "keypress" event handler:

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

I'm using Ubuntu 12.04 64 bits. Focusing the select element and pressing the up/down arrow keys...

In Chrome 29.0.1547.65: the counter does not increment, as if the function is simply not called at all, maybe due to ng-keypress not being evaluated. But the select element works fine.

In Firefox 23.0: the counter does increment - this means ng-keypress is evaluated, and the event handler function is being called successfully. But the select option remains the same and, for my utter astonishment, the background color gets increasingly blue on each keypress!

Well... something is definetely not right here...

I've seen issues #4216 and #2616 - they are also related to keyboard + select, but it seems nobody there actually tried to combine the select with ngKeypress yet...

If you are reading this, please inform us what happens in the Plunker using your browser. Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions