IE has a slightly different box model than other browsers. Compensate for it.

git-svn-id: https://shellinabox.googlecode.com/svn/trunk@82 0da03de8-d603-11dd-86c2-0f8696b7b6f9
This commit is contained in:
zodiac 2009-03-20 06:39:50 +00:00
parent cdd4ae34eb
commit f6f51448d5

View file

@ -990,8 +990,8 @@ VT100.prototype.putString = function(x, y, text, style) {
// If we are in a non-empty line, take the cursor Y position from the // If we are in a non-empty line, take the cursor Y position from the
// other elements in this line. If dealing with broken, non-proportional // other elements in this line. If dealing with broken, non-proportional
// fonts, this is likely to yield better results. // fonts, this is likely to yield better results.
pixelY = span.offsetTop; pixelY = span.offsetTop +
span.offsetParent.offsetTop;
s = this.getTextContent(span); s = this.getTextContent(span);
var nxtIdx = idx - s.length; var nxtIdx = idx - s.length;
if (nxtIdx < 0) { if (nxtIdx < 0) {