[openstreetmap/openstreetmap-website] Don't set width of richtext preview (PR #4886)

Anton Khorev notifications at github.com
Fri Jun 7 15:15:06 UTC 2024


Richtext preview div has its width set to the edit textarea, but why?

Make the browser window wide enough and start editing some text:
![image](https://github.com/openstreetmap/openstreetmap-website/assets/4158490/145fc9af-4876-4755-aed7-0be648e936c5)

Click *Preview* and start shrinking the window. You may get something like this because the preview wouldn't shrink:
![image](https://github.com/openstreetmap/openstreetmap-website/assets/4158490/99726539-da65-4c5a-af4b-1ae02477d08d)

---

Preview and Help won't overlap if the width setting code is removed:
![image](https://github.com/openstreetmap/openstreetmap-website/assets/4158490/be2f4b20-83ed-4677-9bde-b45d5905ccfb)

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

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

-- Commit Summary --

  * Don't set width of richtext preview

-- File Changes --

    M app/assets/javascripts/richtext.js (2)

-- Patch Links --

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

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

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


More information about the rails-dev mailing list