[openstreetmap/openstreetmap-website] Use bindPopup options to set min width of user popup (PR #4722)

Anton Khorev notifications at github.com
Thu Apr 25 01:56:26 UTC 2024


Leaflet may get confused if you use css `min-width` property on popup contents.

Examples in Chromium where scrollbars always take width.

Here I made the contents longer and limited the popup height while keeping css `min-width`:
![image](https://github.com/openstreetmap/openstreetmap-website/assets/4158490/3aea1c01-fb3a-4124-b646-4ab580d27680)

This is with `minWidth` `.bindPopup` option, no horizontal scrollbar appears:
![image](https://github.com/openstreetmap/openstreetmap-website/assets/4158490/06872411-228b-418d-9414-c51cc61c0049)

You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/4722

-- Commit Summary --

  * Use bindPopup options to set min width of user popup

-- File Changes --

    M app/assets/javascripts/user.js (2)
    M app/assets/stylesheets/common.scss (1)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/4722.patch
https://github.com/openstreetmap/openstreetmap-website/pull/4722.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4722
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/4722 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240424/9ff8deb8/attachment.htm>


More information about the rails-dev mailing list