File tree Expand file tree Collapse file tree 2 files changed +18
-13
lines changed
sources/net.sf.j2s.java.org.eclipse.swt/src/org/eclipse/swt Expand file tree Collapse file tree 2 files changed +18
-13
lines changed Original file line number Diff line number Diff line change @@ -209,17 +209,21 @@ public boolean dragging(DragEvent e) {
209209 yy = -1 ;
210210 }
211211 }
212- // try {
213- this .frame .style .left = xx + "px" ;
214- this .frame .style .top = yy + "px" ;
215- if (document .body .scrollLeft != 0 ) {
216- document .body .scrollLeft = 0 ;
217- }
218- if (document .body .scrollTop != 0 ) {
219- document .body .scrollTop = 0 ;
220- }
221- // } catch (e) {
222- // }
212+ this .frame .style .left = xx + "px" ;
213+ this .frame .style .top = yy + "px" ;
214+ /*
215+ * In early SWT implementation, document.body is always with
216+ * "overflow:hidden;" CSS. Now, there are no such constraints.
217+ *
218+ * -Feb 27, 2007
219+ *
220+ if (document.body.scrollLeft != 0) {
221+ document.body.scrollLeft = 0;
222+ }
223+ if (document.body.scrollTop != 0) {
224+ document.body.scrollTop = 0;
225+ }
226+ */
223227 return true ;
224228 };
225229 public boolean dragEnded (DragEvent e ) {
Original file line number Diff line number Diff line change @@ -1694,7 +1694,8 @@ public void setMaximized (boolean maximized) {
16941694 Element b = document .body ;
16951695 boolean isStrictMode = b .parentNode .clientHeight != 0 ;
16961696 Element node = b ;
1697- if ((OS .isIE ) && isStrictMode ) {
1697+ if (((OS .isFirefox && node .scrollLeft == 0 && node .scrollTop == 0 )
1698+ || OS .isIE ) && isStrictMode ) {
16981699 node = b .parentNode ;
16991700 }
17001701 Monitor monitor = getMonitor ();
@@ -1731,7 +1732,7 @@ public void setMaximized (boolean maximized) {
17311732 if (contentHandle != null ) {
17321733 if (oldBounds == null ) {
17331734 oldBounds = getBounds ();
1734- oldBounds .width -= 4 ; // FIXME
1735+ // oldBounds.width -= 4; // FIXME
17351736 }
17361737 //Monitor monitor = getMonitor();
17371738 int height = monitor .clientHeight ;
You can’t perform that action at this time.
0 commit comments