components icon indicating copy to clipboard operation
components copied to clipboard

Enter on mdInput triggers MouseEvent on associated form elements

Open fergusg opened this issue 8 years ago • 3 comments

Bug:

In the attached StackBlitz, pressing Enter in the input element triggers a MouseEvent on the associated button.

What is the expected behaviour?

Enter should not trigger events on associated elements.

Workaround is to test for MouseEvent.pageX (say)

What is the current behaviour?

(see above)

What are the steps to reproduce?

https://stackblitz.com/edit/angular-mkavs6-fzxrhj

Which versions of Angular, Material?

NG 6.0.0

fergusg avatar May 07 '18 13:05 fergusg

This is the default way that native inputs behave. I don't think it's something Material should be messing with.

crisbeto avatar May 07 '18 15:05 crisbeto

OK KeyboardEvent triggering MouseEvent is not what I'd have expected.

fergusg avatar May 07 '18 15:05 fergusg

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.