Skip to content

Commit db126c2

Browse files
author
zhourenjian
committed
Fixing bug that if Console is hidden, System.out.println call inside ScrollBar scrolling may result in being unable to scroll the bar.
1 parent c743ec8 commit db126c2

File tree

1 file changed

+19
-1
lines changed
  • sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/widgets

1 file changed

+19
-1
lines changed

sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt/widgets/Console.java

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,17 @@ public void shellClosed(ShellEvent e) {
4848
Element el = document.getElementById("_console_");
4949
if (el != null) {
5050
el.parentNode.removeChild(el);
51-
el.style.display = "none";
51+
if (OS.isIE) {
52+
el.style.display = "block";
53+
el.style.position = "absolute";
54+
el.style.width = "200px";
55+
el.style.height = "200px";
56+
el.style.left = "-400px";
57+
el.style.top = "-400px";
58+
el.style.overflow = "hidden";
59+
} else {
60+
el.style.display = "none";
61+
}
5262
el.style.fontSize = "";
5363
document.body.appendChild(el);
5464
}
@@ -137,6 +147,14 @@ protected void createContents() {
137147
} else {
138148
el.parentNode.removeChild(el);
139149
el.style.display = "";
150+
if (OS.isIE) {
151+
el.style.position = "";
152+
el.style.width = "";
153+
el.style.height = "";
154+
el.style.left = "";
155+
el.style.top = "";
156+
el.style.overflow = "";
157+
}
140158
}
141159
el.style.fontSize = "10pt";
142160
consoleWrapper.handle.appendChild(el);

0 commit comments

Comments
 (0)