Skip to content

Commit 5aabdad

Browse files
author
zhourenjian
committed
Fixed bug that clicking a Link widget will add hash to URL in IE
1 parent b15ab20 commit 5aabdad

File tree

1 file changed

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

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,13 @@ public void run() {
340340
e.display = display;
341341
sendEvent(SWT.Selection);
342342
toReturn(false);
343+
/**
344+
* For IE: No hashes(#) in window.location!
345+
* @j2sNative
346+
* var evt = this.getEvent ();
347+
* evt.cancelBubble = true;
348+
* evt.returnValue = false;
349+
*/ {}
343350
}
344351
};
345352
for (int i = 0; i < anchors.length; i++) {

0 commit comments

Comments
 (0)