Open sireeshap opened 4 years ago
I'm having the same problem. Is there any fix on the horizon?
Same problem for me with angular 12 and ngx-bootstrap ^7.1.2 with bootstrap 5
I have a similar issue, in my case I implemented the datepicker within a dropdown. When scrolling, the datepicker container moves and when hovering over it, it repositions itself, with a delay of 1 second. I checked and apparently under these conditions, the datepicker does not perceive the window scroll event, causing it to move along with the scroll and reposition later. I tried listening to the scroll event to see what was happening and it turns out that by doing so, the datepicker already associates the event with its logic, causing it to remain under its container.
I'm not sure if it's the best solution but it worked for me.
scroll = (e: any) => console.log('scroll'); ngOnInit() { document.addEventListener('scroll', this.scroll, true); } ngOnDestroy() { document.removeEventListener('scroll', this.scroll, true); }
this is duplicate of #2993 which is closed, but still persist in version "ngx-bootstrap": "^5.6.1". Please fix this to save developers life.