valor-software / ngx-bootstrap

Fast and reliable Bootstrap widgets in Angular (supports Ivy engine)
https://valor-software.com/ngx-bootstrap
MIT License
5.53k stars 1.69k forks source link

fix(datepicker): lag on datepicker in a modal re-alignment after scrolling #2993

Closed JimJafar closed 5 years ago

JimJafar commented 6 years ago

Bug description or feature request:

If you have a datepicker in a modal, and then scroll the modal the datepicker is left behind. After a long pause (maybe 10 seconds), the datepicker will jump back to the input. If you click the datepicker that also causes it to jump to the input.

Versions of ngx-bootstrap, Angular, and Bootstrap:

ngx-bootstrap: 1.9.3

Angular: 4.3.2

Bootstrap: bootstrap-sass 3.3.7

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

Webpack yo angular2-typescript generator version 0.8.1.

valorkin commented 6 years ago

Any pop-ups elemens has reposition on zone stable event, with ngv4 I will try to rewrite positioning, to work outside zone at all

jamessawyer commented 6 years ago

+1 some issue, it seems 'this._ngZone.onStable.subscribe(() =>{})' keeps ticking.

masonwheeler commented 6 years ago

This isn't just limited to popups; it seems to affect all scrolling. I've got a scenario where opening a ModalDirective adds over 30 handlers to the window's scroll event, which don't get removed when you close the modal, causing severe lag when scrolling.

They do get removed when navigating away from the page, but until that point, we have what ought to be considered a resource leak. If these handlers are needed for the modal, then calling hide() on the modal, or any other method of removing it from view, should unload them.

raideltorres commented 5 years ago

This was marked as solved but is already deployed ? I'm using 3.3.0 but still having the same issue and this is not happening only in a modal. Please I really need this.

raideltorres commented 5 years ago

Moved to 4.1.1 and still same issue.

agroves333 commented 4 years ago

This is still an issue. There is a nasty ~1s lag between scrolling and the datepicker jumping to the new scroll location.

sireeshap commented 4 years ago

i am using "ngx-bootstrap": "^5.6.1", still i am facing this issue. date picker panel is moving while scrolling and not staying with text input box.