Skip to content
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

Inline date picker stops propagation of click event #5404

Open
livthomas opened this issue Sep 25, 2019 · 3 comments
Open

Inline date picker stops propagation of click event #5404

livthomas opened this issue Sep 25, 2019 · 3 comments

Comments

@livthomas
Copy link
Contributor

We're not able to bind click or dblclick events to inline date picker component in our application. It seems that this component stops click event propagation:

https://github.com/valor-software/ngx-bootstrap/blob/development/src/datepicker/themes/bs/bs-datepicker-inline-container.component.ts#L17

Bug description or feature request:

Bug description

Plunker/StackBlitz that reproduces the issue:

StackBlitz: https://stackblitz.com/edit/ngx-bootstrap-click

You can see that only mousedown event is emitted and both click and dblclick are ignored.

Versions of ngx-bootstrap, Angular, and Bootstrap:

ngx-bootstrap: 5.2.0

Angular: 8.2.7

Bootstrap: ?

Build system: Angular CLI, System.js, webpack, starter seed:

Angular CLI

@daniloff200
Copy link
Contributor

daniloff200 commented Feb 6, 2020

Actually, in your example (dblclick) is working, but, (click) is definitely stopped.

🤔
I see, that such code exists in all .container components

that was made looong time ago in 6472b6f , so, I assume we need to leave it as it is, or, to rewrite in some way, to allow use (click) and (dblclick).

Gonna investigate, what I can do here

@daniloff200
Copy link
Contributor

daniloff200 commented Feb 6, 2020

Well, I think I managed to fix that issue with stopPropagation for datepicker, but, looks like that's impossible for daterangepicker because we expect daterangepicker not to close after first click. If you need that for daterangepicker too, please, let me know, it will require more work
cc @livthomas

@livthomas
Copy link
Contributor Author

@daniloff200 We only use datepicker at the moment so that's fine. Thanks a lot for looking into this!

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

Successfully merging a pull request may close this issue.

2 participants