googlemaps / googlemaps/extended-component-library

google.maps.places.Autocomplete: suggestion box position is absolute to <body> instead of <input>

Open
#186 4 comments 1 reaction 0 assignees View on GitHub
type: bug
Dominant language
TypeScript
Stars
192
Forks
22
Avg merge
2d 23h
Merged PRs (30d)
8

Description

#### Environment details

1. Specify the API at the beginning of the title (for example, "Places: ...")

https://github.com/googlemaps/extended-component-library/blob/4541b75a28a9059e85714b08caa36eade5dfc2e9/src/place_picker/place_picker.ts#L379-L382

2. OS type and version: Linux 6.7.9

3. Library version: 0.6.7

#### Steps to reproduce

1. Use `` in a page with vertical overflow content (i.e. `overflow-y: "scroll")
2. Search something
3. Scroll the page down
4. The dropdown suggestion box is positioned relative to `` instead of the search bar ``

Demo:

https://github.com/googlemaps/extended-component-library/assets/20135478/1f9ef1da-a935-4eef-9d21-6f39a02427a3

#### Code example

Minimal reproducible code in React

```tsx
import * as GMPX from '@googlemaps/extended-component-library/react';
import React from 'react';

const API_KEY = process.env.REACT_APP_MAPS_API_KEY;

export default class App extends React.Component {
render() {
return (




);
}
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.