Skip to content

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

Open
@tietor

Description

@tietor

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: 19.0.2

Angular: 19.0.6

Bootstrap: 5.3.0

Stackblitz example: https://stackblitz.com/edit/stackblitz-starters-ccjwbqfj?file=src%2Fmain.ts

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions