rust-lang / rust-playground

The Rust Playground
https://play.rust-lang.org/
Apache License 2.0
1.27k stars 209 forks source link

Bottom of editor gets cut off when embedded or in mobile view #597

Open richardanaya opened 4 years ago

richardanaya commented 4 years ago

Hello :) I noticed that it's pretty easy for the editor to get cut off at the bottom of the screen in embedded or mobile view.

Steps to repro:

  1. open editor in chrome
  2. open inspector
  3. toggle mobile view in inspector
  4. notice that the bottom is cut off

This also happens in embedded view like on https://tourofrust.com/

Rudxain commented 1 year ago

Related: Everytime I touch to type something, Chrome for Android zooms-in too much, and I can only see 1 or 2 words. I have to manually zoom-out, to continue typing comfortably

philibe commented 1 year ago

@Rudxain

Everytime I touch to type something, Chrome for Android zooms-in too much.

Same for me, until I've looked at @Sunjay answer. It works for me on Android with Chrome, Duckduckgo, Kiwi.

I believe this is an issue with ace editor. If you click on "Config" and click "Simple" (under Style), you can edit normally in a regular textarea.

Originally posted by @sunjay in https://github.com/rust-lang/rust-playground/issues/353#issuecomment-403635610

Rudxain commented 1 year ago

@philibe Thanks! I forgot about that "trick". I now remember I found that workaround on accident, when trying multiple editors

nightwing commented 1 year ago

The issue with ace being zoomed too much will be fixed with https://github.com/ajaxorg/ace/pull/5085. Adding <meta name="viewport" content="width=device-width,height=device-height" /> to the page would have helped as well.