Closed thiagokokada closed 7 years ago
I put a datepicker popup from angular-ui. When I select a date, I have the same issue (pageslide closes). Pressing today/clear/close button does not trigger the issue.
Adding ps-click-outside="false"
seems to solve the issue, however this is not really what I want. Any tips?
Made a Plunkr showing the problem: https://plnkr.co/edit/9lfwhCpOmzyh4r4fKCgI
Hope it helps.
Thanks for reporting, I expect the problem to behttps://github.com/dpiccone/ng-pageslide/blob/master/src/angular-pageslide-directive.js#L315 since the autoClose param is not initialized properly. It should be moved at line 51 and sanitized properly.
Hope this helps for the moment, will make the fix and release a new version in the next days
Well, apart from that, and your plunker helped a lot :+1: , I discovered that onBodyClick
was closing the pageslide since by the time you clicked on the date, the button was removed from the DOM and so !slider.contains(target)
was returning true.
I am adding an extra check so that the element should belong to the body as well.
I have the following using pageslide:
And this is the on click function associated with those buttons (as you can see, it doesn't modify the variable that psOpen is monitoring):
When I click in any button generated with the ng-repeat, pageslide closes. I have other buttons in the same pageslide that does not trigger this issue, only in those ones listed in the code. This seems really strange, any hint what may be the issue here?