Closed
Description
Bug, feature request, or proposal:
When using the touchUi feature of the datepicker, the overlay should close when the overlay background is clicked.
What is the current behavior?
Clicking outside the overlay removes the background but does not close the overlay. After the background is removed, clicking any button on the overlay closes the overlay instead of performing the button's action.
What is the expected behavior?
Clicking outside the overlay should close the overlay. The overlay should not close unless a date is selected or someone clicks outside the overlay.
What is the use-case or motivation for changing an existing behavior?
Improve usability
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular: 4.2.0
Material: 2.0.0-beta.6
Is there anything else we should know?
Adding the click listener to the Component's host property provides the correct behavior, even though no action is actually taken when the event occurs:
@Component({
...
host: {
'(document:click)': 'onClick()',
}
})
export class MyComponent {
...
private onClick(): void { }
}