-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Datepicker Pop-up Doesn't Close when Overlay Background is Clicked #5118
Comments
Reproduction? It seems to be working fine here https://plnkr.co/edit/1FUa9Lv8Xmm38eVzPCX6?p=preview for Chrome, Safari, FF |
Nevermind, I am occasionally seeing this too. Working on reproducing |
This demos the issue: https://plnkr.co/edit/nDws65ii76v9xHDQKURU?p=preview It shows up whenever the parent component uses |
Ah--yes, you're correct. The issue only appears when the parent component uses OnPush. Thanks! |
You likely already know (as it probably uses the same resource), but it seems the same is true for MdDialog. |
@crisbeto Actually I think this might be unrelated. Seems to be because the datepicker is explicitly setting the |
…hange detection * Adds a `markForCheck` call after starting the dialog animation, in order to ensure that it animates away if it was opened from a component with OnPush change detection. * Since we can't know whether the animation will start right after the `markForCheck`, these changes switch to starting the backdrop animation together with the dialog animation. This avoids some slight timing issues where the backdrop can start its animation a little too early. * Simplifies the dialog animation streams to avoid having to subscribe to the `completed` callback in the `MdDialogRef`. * Fixes the demo app sidenav jumping to the bottom when it is opened from the homepage. * Fixes some alignment in the dialog demo that got thrown off by the new input width. The dialog changes should solve issues like angular#5118.
…hange detection * Adds a `markForCheck` call after starting the dialog animation, in order to ensure that it animates away if it was opened from a component with OnPush change detection. * Since we can't know whether the animation will start right after the `markForCheck`, these changes switch to starting the backdrop animation together with the dialog animation. This avoids some slight timing issues where the backdrop can start its animation a little too early. * Simplifies the dialog animation streams to avoid having to subscribe to the `completed` callback in the `MdDialogRef`. * Fixes the demo app sidenav jumping to the bottom when it is opened from the homepage. * Fixes some alignment in the dialog demo that got thrown off by the new input width. The dialog changes should solve issues like angular#5118.
…hange detection * Adds a `markForCheck` call after starting the dialog animation, in order to ensure that it animates away if it was opened from a component with OnPush change detection. * Since we can't know whether the animation will start right after the `markForCheck`, these changes switch to starting the backdrop animation together with the dialog animation. This avoids some slight timing issues where the backdrop can start its animation a little too early. * Simplifies the dialog animation streams to avoid having to subscribe to the `completed` callback in the `MdDialogRef`. * Fixes the demo app sidenav jumping to the bottom when it is opened from the homepage. * Fixes some alignment in the dialog demo that got thrown off by the new input width. The dialog changes should solve issues like #5118.
…hange detection * Adds a `markForCheck` call after starting the dialog animation, in order to ensure that it animates away if it was opened from a component with OnPush change detection. * Since we can't know whether the animation will start right after the `markForCheck`, these changes switch to starting the backdrop animation together with the dialog animation. This avoids some slight timing issues where the backdrop can start its animation a little too early. * Simplifies the dialog animation streams to avoid having to subscribe to the `completed` callback in the `MdDialogRef`. * Fixes the demo app sidenav jumping to the bottom when it is opened from the homepage. * Fixes some alignment in the dialog demo that got thrown off by the new input width. The dialog changes should solve issues like #5118.
…hange detection (#6164) * Adds a `markForCheck` call after starting the dialog animation, in order to ensure that it animates away if it was opened from a component with OnPush change detection. * Since we can't know whether the animation will start right after the `markForCheck`, these changes switch to starting the backdrop animation together with the dialog animation. This avoids some slight timing issues where the backdrop can start its animation a little too early. * Simplifies the dialog animation streams to avoid having to subscribe to the `completed` callback in the `MdDialogRef`. * Fixes the demo app sidenav jumping to the bottom when it is opened from the homepage. * Fixes some alignment in the dialog demo that got thrown off by the new input width. The dialog changes should solve issues like #5118.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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:
The text was updated successfully, but these errors were encountered: