Skip to content

Commit 5947abd

Browse files
author
zhourenjian
committed
Fixed bug that Java2Script's SWT Text component hangs Google Chrome
1 parent 37521d4 commit 5947abd

File tree

1 file changed

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

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ public void run() {
248248
handle.appendChild(wrapper);
249249
wrapper.appendChild(textHandle);
250250
//handle.appendChild(textHandle);
251+
if (!OS.isChrome)
251252
/**
252253
* TODO: IE does not trigger onscroll when dragging inner text input
253254
*
@@ -727,8 +728,6 @@ public Rectangle computeTrim (int x, int y, int width, int height) {
727728
// int margins = OS.SendMessage(handle, OS.EM_GETMARGINS, 0, 0);
728729
// rect.x -= margins & 0xFFFF;
729730
// rect.width += (margins & 0xFFFF) + ((margins >> 16) & 0xFFFF);
730-
// System.out.println(rect);
731-
// System.out.println(width + "," + height);
732731
if ((style & SWT.MULTI) != 0) {
733732
rect.width += 6;
734733
} else {

0 commit comments

Comments
 (0)