diff --git a/README.md b/README.md index ab1bb1d..77ce54d 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ shellinabox =========== +[![Build Status](https://drone.io/github.com/shellinabox/shellinabox/status.png)](https://drone.io/github.com/shellinabox/shellinabox/latest) [![Join the chat at https://gitter.im/shellinabox/shellinabox](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/shellinabox/shellinabox?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -[![Build Status](https://drone.io/github.com/shellinabox/shellinabox/status.png)](https://drone.io/github.com/shellinabox/shellinabox/latest) This is unofficial fork of project **Shell In A Box**. Fork was created because original project is not maintained anymore and we cannot contact original @@ -96,5 +96,12 @@ Issues All reported issues were imported from [Google Code Project Issues](https://code.google.com/p/shellinabox/issues/list). You can report new issues here, but first please try to reproduce them with package -created from our sources. +created from our sources. In new issue report please include following things: +* Name and version of your operating system +* Name and version of your browser +* Version of shellinabox +* Steps to reproduce the problem + +Also feel free to post any questions or comments in [shellianbox chat room](https://gitter.im/shellinabox/shellinabox) +on Gitter. diff --git a/shellinabox/vt100.jspp b/shellinabox/vt100.jspp index 9f8fd8f..e06efca 100755 --- a/shellinabox/vt100.jspp +++ b/shellinabox/vt100.jspp @@ -987,12 +987,16 @@ VT100.prototype.initializeElements = function(container) { x += parent.offsetLeft; y += parent.offsetTop; } + // When zoom functionality is used, some browsers report container offsetWidth + // wrong by one pixel. This is the reason why widthDiff can be 0 or -1 pixel, + // and in this case variable isEmbedded is not set to true. + var widthDiff = ((window.innerWidth || + document.documentElement.clientWidth || + document.body.clientWidth) - marginRight) + - (x + this.container.offsetWidth); this.isEmbedded = marginTop != y || marginLeft != x || - (window.innerWidth || - document.documentElement.clientWidth || - document.body.clientWidth) - - marginRight != x + this.container.offsetWidth; + (widthDiff != 0 && widthDiff != -1); if (!this.isEmbedded) { // Some browsers generate resize events when the terminal is first // shown. Disable showing the size indicator until a little bit after