mapbox / mapbox/mapbox-gl-geocoder
Mapbox geocoder [map.addControl(geocoder);] distorts in WordPress
- Dominant language
- JavaScript
- Stars
- 388
- Forks
- 181
- PR merge metrics
- No merged PRs in 30d
Description
I have added the Mapbox geocoder to my web map in the top-left position and made it collapsible.

As raw HTML it looks and works as expected.

However, once the code is copied and added into WordPress as a code block it completely distorts.

Can't seem to figure out what causes this or how to fix it. Any thoughts?
Here is a copy of the current code:
[GeocoderIssue.txt](https://github.com/mapbox/mapbox-gl-geocoder/files/12261301/GeocoderIssue.txt)
Contributor guide
Research direction
Start with the attached GeocoderIssue.txt and compare the raw HTML rendering with the WordPress code-block rendering, including the map.addControl(geocoder) setup. Identify whether WordPress changes the markup or applies conflicting styles; done means the collapsible top-left geocoder renders correctly in WordPress as it does in raw HTML.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100