Forums

Python 3 console in Chrome too small

https://www.pythonanywhere.com/embedded3/

Not quite sure whether it's local or remote, but despite several deep refreshes the console remains a black one liner. All I can see is that: id="scrollable" class="" style="height: 19px" is probably the source of the problem.

Firefox/Aurora works, though.

Odd, I don't see that. Which version of Chrome are you using?

Version 32.0.1700.14 beta, but same Version on another machine works.

That's odd. Same OS on both machines? Are there any plugins installed?

2xUbuntu, plugins are synced. Strangely enough the working browser has an sockjs error, the other's JS console is empty. And happens with all consoles (py2.7, py3, Bash) within iframe and not. Cleared the cookies. Running out of ideas....

That's definitely odd. What's the sock.js error?

Hmm, someone sent us this pull request on the console component earlier on today. Appears to be for Chrome 31, but I wonder if integrating it would fix your problems too -- the area of the code looks roughly right. We'll try integrating it tomorrow and check it doesn't break stuff.

I tried the link above on Version 30.0.1599.114 Built on Ubuntu 13.04, running on LinuxMint 15 (30.0.1599.114-0ubuntu0.13.04.2) of Chromium and it worked super fine on Mint 15 Cinnamon.

Right, sounds like it's almost certainly an issue in a Chrome update. The pull request says it's fixes for 31, but I'm running 31 here without problems -- given @noiv's posts above, and the kind of changes they are, it sounds plausible that they're for 32. Harry's taking a look at them today.

I would have looked at something newer, but I'm a distro guy on this particular machine...☺

Thanks for all the input, did not expect that for single browser installation failure. Using firefox is an acceptable workaround, well, except the german keyboard. Did a reinstall of Chrome to no change. Tried to fix it manually and if body has margin: 0 and id="scrollable" the height of the window, I get the console I like, fully functionable. Perhaps an event like onload got lost.

I'm glad you had a work around...☺

I've found what I've changed: On the little netbook the system font sizes from 9 to 8 to achieve more screen estate. Pretty reproducible. Ubuntu 12.10 with Gnome-Shell.

Now escalate that at Chrome, Ubuntu, Gnome or the terminal?

Why escalate? Isn't the ability to change a font size a feature not a bug? Or did I miss something obvoius?

Well, with font size 8 the terminal shows up with one line in the upper half of the window and with font size 9 it fills the window. That's at least unexpected behaviour.

Ahhh, that's what I was missing...Only getting 1 line with 8. I read "font sizes from 9 to 8 to achieve more screen estate" from the post above and got confused...☺

Thank-you for the correction on my part.

~a2j

It definitely sounds related to a bug in the web-based console. It doesn't handle non-default zoom levels and perhaps the different system font has a similar effect. That's still pretty weird, though.

One extra bit of diagnostics that would help confirm or refute that hypothesis -- if you go to the console, then set the zoom level to zero (normally control-0), then try zooming in (control-+), perhaps that might fix it? Or maybe zooming out? What I'm thinking is that at some specific zoom level it might suddenly start working.

Modern browsers are both exciting and painful!! How many ugly hacks did you guys have to do to make our consoles work in-browser? I'm just wondering if we're talking about dozens or hundreds here. Not a count.

There's a lot of nasty stuff in there; luckily we were able to avoid writing a lot of it ourselves by forking an existing VT100 clone, but it's very much an ongoing process. The real horror is in key processing. Different languages' keyboards use the same keycode to mean different things, which is why we have problems we just can't fix with (eg.) certain continental European keyboards -- if we made it work for Swiss AZERTY keyboards, we could easily break it for UK QUERTY. It's crazy, this stuff was meant to have been sorted out decades ago... and in general, it is, but the hacks required to get input working the way it needs to for a terminal un-sort it out.

re: keyboard, best thing is middle click works :)

For paste? Well, that's something :-)

@giles: Thx for the info!