components icon indicating copy to clipboard operation
components copied to clipboard

Input doesn't blur by clicking outside of it on IOS.

Open pmilic021 opened this issue 8 years ago • 3 comments

Bug, feature request, or proposal:

Bug?

What is the expected behavior?

When user clicks on input, keyboard opens, and when clicks outside of input, keyboard closes (and blurs input).

What is the current behavior?

When user clicks on input, keyboard opens, and when clicks outside of input, keyboard remains open (and input doesn't get blurred - the caret is still pinging inside input).

What are the steps to reproduce?

Providing a StackBlitz/Plunker (or similar) is the best way to get the team to see your issue.
Plunker starter (using on @master): https://goo.gl/uDmqyY
StackBlitz starter (using latest npm release): https://goo.gl/wwnhMV
Open https://material.angular.io/components/input/overview on any IOS browser and click on input field, and then click outside of it.

What is the use-case or motivation for changing an existing behavior?

It is intuitive to close blur input by clicking outside of it.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

All browsers on IOS (tested on safari, firefox and chrome), latest angular and material.

Is there anything else we should know?

When I add (blur) to the input, it wont fire by clicking outside of the input element, only once I managed to change focus to another element (e.g. some other input).

pmilic021 avatar Jan 26 '18 13:01 pmilic021

AFAIK this is how iOS handles focus in general. It doesn't move focus or dispatch click events unless you've tapped on something it considers tappable (e.g. a button, a link, something with cursor: pointer).

crisbeto avatar Jan 28 '18 12:01 crisbeto

Guess I'll just leave it as it is then, and call it "feature". Thanks!

pmilic021 avatar Jan 29 '18 13:01 pmilic021

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.