More IE5.5 and IE6 tweaks. Those browsers are surprisingly finicky. Everything

else is better at following the specs...


git-svn-id: https://shellinabox.googlecode.com/svn/trunk@83 0da03de8-d603-11dd-86c2-0f8696b7b6f9
This commit is contained in:
zodiac 2009-03-21 06:05:59 +00:00
parent f6f51448d5
commit b2737d02f6
3 changed files with 20 additions and 6 deletions

View file

@ -95,7 +95,7 @@
#define STDC_HEADERS 1
/* Most recent revision number in the version control system */
#define VCS_REVISION "81"
#define VCS_REVISION "82"
/* Version number of package */
#define VERSION "2.4"

View file

@ -13,6 +13,10 @@
margin: 0px;
}
#vt100 pre pre {
overflow: hidden;
}
#vt100 #scrollable {
overflow-x: hidden;
overflow-y: scroll;
@ -55,6 +59,7 @@
visibility: hidden;
width: 1px;
height: 0px;
overflow: hidden;
}
#vt100 .hidden {

View file

@ -198,6 +198,7 @@ VT100.prototype.initializeElements = function(container) {
!this.getChildById(this.container, 'scrollable') ||
!this.getChildById(this.container, 'console') ||
!this.getChildById(this.container, 'alt_console') ||
!this.getChildById(this.container, 'ieprobe') ||
!this.getChildById(this.container, 'padding') ||
!this.getChildById(this.container, 'cursor') ||
!this.getChildById(this.container, 'lineheight') ||
@ -235,10 +236,13 @@ VT100.prototype.initializeElements = function(container) {
'<div id="menu"></div>' +
'<div id="scrollable">' +
'<pre id="lineheight">&nbsp;</pre>' +
'<pre id="console"></pre>' +
'<pre id="console">' +
'<pre></pre>' +
'<div id="ieprobe"><span>&nbsp;</span></div>' +
'</pre>' +
'<pre id="alt_console" style="display: none"></pre>' +
'<div id="padding"></div>' +
'<pre id="cursor">X</pre>' +
'<pre id="cursor">&nbsp;</pre>' +
'</div>' +
'<div class="hidden">' +
'<input type="textfield" id="input" />' +
@ -274,6 +278,7 @@ VT100.prototype.initializeElements = function(container) {
this.console =
[ this.getChildById(this.container, 'console'),
this.getChildById(this.container, 'alt_console') ];
var ieProbe = this.getChildById(this.container, 'ieprobe');
this.cursor = this.getChildById(this.container, 'cursor');
this.lineheight = this.getChildById(this.container,
'lineheight');
@ -288,8 +293,12 @@ VT100.prototype.initializeElements = function(container) {
// but it turns out that browsers sometimes invalidate these values
// (e.g. while displaying a print preview screen).
this.cursorWidth = this.cursor.clientWidth;
this.cursorHeight = this.lineheight.clientHeight ||
this.cursor.clientHeight;
this.cursorHeight = this.lineheight.clientHeight;
// IE has a slightly different boxing model, that we need to compensate for
this.isIE = ieProbe.offsetTop > 1;
ieProbe = undefined;
this.console.innerHTML = '';
// Determine if the terminal window is positioned at the beginning of the
// page, or if it is embedded somewhere else in the page. For full-screen
@ -1018,7 +1027,7 @@ VT100.prototype.putString = function(x, y, text, style) {
}
}
if (pixelX >= 0) {
this.cursor.style.left = pixelX + 'px';
this.cursor.style.left = (pixelX + (this.isIE ? 1 : 0)) + 'px';
} else {
this.cursor.style.left = this.cursorX*this.cursorWidth +
console.offsetLeft + 'px';