valor-software / ngx-bootstrap

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

adaptivePosition has problems with css property overflow-x and overflow-y #6602

Open tietor opened 1 year ago

tietor commented 1 year ago

Bug description:

I have this code here:

<div class="row" style="overflow-x: auto; overflow-y: hidden">
  <div class="col-xs-12 col-12 col-md-4 form-group mb-3">
    <input type="text"
           placeholder="Datepicker"
           class="form-control"
           bsDatepicker
           [bsConfig]="{ adaptivePosition: true }">
  </div>
</div>

the datepicker won't get displayed correctly: image

this happens because of the following style properties: overflow-x: auto; overflow-y: hidden

if i remove these 2 properties, the datepicker is displayed correctly: image

why does these 2 css properties have negative impacts to the adaptivePosition? in my opinion the adaptivePosition should also work, when i set these 2 css properties. it shouldn't consider them. it should consider the browser window.

Versions of ngx-bootstrap, Angular, and Bootstrap:

ngx-bootstrap: 10.2.0

Angular: 15.0.1

Bootstrap: 5.2.3

omsrivastava commented 11 months ago

Facing the same issue on tablets and phones. When opening the calendar with adaptivePosition: true, some of its portion is getting out of the viewport.

image image

CC: @valorkin

tietor commented 2 months ago

What is with this issue? I'm still waiting for a solution

lexasq commented 2 weeks ago

@tietor hey, could you provide a proper plunker or stackblitz reproduction?