Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

fix(datepicker): ensure the original target is not in popup #4316

Closed
wants to merge 1 commit into from

Conversation

wesleycho
Copy link
Contributor

  • Ensure that the original event target is not a child of the popup element to avoid edge case where the datepicker closes on any click

This fixes #4314

- Ensure that the original event target is not a child of the popup element to avoid edge case where the datepicker closes on any click
@wesleycho wesleycho added this to the 0.13.4 (Performance) milestone Aug 31, 2015
@Foxandxss
Copy link
Contributor

👍

@wesleycho wesleycho closed this in 9b2f7ac Sep 1, 2015
@wesleycho wesleycho deleted the fix/datepicker-popup branch September 1, 2015 13:30
@yjukaku
Copy link
Contributor

yjukaku commented Sep 10, 2015

This fix seems to have broken IE support. The popupEl seems to sometimes be a non-element node - IE doesn't support the contains method on non-element nodes, so this crashes.

@wesleycho
Copy link
Contributor Author

@yjukaku can you try the change I just pushed up 65814f1 and let me know if that change fixes the issue?

@yjukaku
Copy link
Contributor

yjukaku commented Sep 11, 2015

@wesleycho Nope, doesn't seem to work.

Take a look at this Plunkr:
http://plnkr.co/edit/IlH0Y4CuhbAkL8mbthmT

This doesn't reference the master branch of the repo, but if you place a breakpoint on the http://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.13.4.js at line 1851 you can see that the popupEl is actually pointing at a ng-if comment. Replacing popupEl with $popup doesn't seem to make a difference ($popup just points to the ng-if comment but wrapped in a jQuery object).

@yjukaku
Copy link
Contributor

yjukaku commented Sep 16, 2015

@wesleycho Any thoughts on this?

Do you want me to send up a pull request that fixes it?

@wesleycho
Copy link
Contributor Author

Sure - the issue to reference is #4411.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Datepicker Popups closing when selecting a month
3 participants