bredzhang / shellinabox

Automatically exported from code.google.com/p/shellinabox
0 stars 0 forks source link

Opera 10.x: Zoom breaks shellinabox-Layout #63

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Visit http://code.google.com/p/shellinabox/ with Opera (tested with
10.10 on Linux and 10.51 on Windows)
2. Select a 90%-Zoom: View -> Zoom -> 90%
3. Reload page.

Now you will see only one line of shellinabox instead of a nice terminal box.

This is because, isEmbedded in vt100.jspp:575 becomes true, because
window.innerWidth is set, but has a different value as "x +
this.container.offsetWidth". documentElement.clientWidth and
document.body.clientWidth would be correct values in Opera here.

I don't know if this is a Opera-bug. Firefox does not change the
window.innerWidth on zoom.

Maybe this thread helps:
http://code.google.com/p/flex-iframe/issues/detail?id=37

sandoz

Original issue reported on code.google.com by siev...@zedat.fu-berlin.de on 6 Apr 2010 at 4:50

GoogleCodeExporter commented 8 years ago
As a hotfix I test for Opera browsers:

In vt100.jspp:560:
this.isOpera                 = (navigator.userAgent.indexOf("Opera")!=-1);

And that at every position of window.innerWidth/Height something like:

(this.isOpera ? document.documentElement.clientWidth : window.innerWidth)

Works quite well. That way isEmbedded is false in my case of a shellinabox in an
iframe. If I hardcode isEmbedded to true, it does not work anymore, but I don't 
know
why. It just shows the first line as described above.

sandoz

Original comment by siev...@zedat.fu-berlin.de on 7 Apr 2010 at 3:30

GoogleCodeExporter commented 8 years ago

Original comment by zod...@gmail.com on 2 Sep 2010 at 11:37