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) {
209
209
yy = -1 ;
210
210
}
211
211
}
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
+ */
223
227
return true ;
224
228
};
225
229
public boolean dragEnded (DragEvent e ) {
Original file line number Diff line number Diff line change @@ -1694,7 +1694,8 @@ public void setMaximized (boolean maximized) {
1694
1694
Element b = document .body ;
1695
1695
boolean isStrictMode = b .parentNode .clientHeight != 0 ;
1696
1696
Element node = b ;
1697
- if ((OS .isIE ) && isStrictMode ) {
1697
+ if (((OS .isFirefox && node .scrollLeft == 0 && node .scrollTop == 0 )
1698
+ || OS .isIE ) && isStrictMode ) {
1698
1699
node = b .parentNode ;
1699
1700
}
1700
1701
Monitor monitor = getMonitor ();
@@ -1731,7 +1732,7 @@ public void setMaximized (boolean maximized) {
1731
1732
if (contentHandle != null ) {
1732
1733
if (oldBounds == null ) {
1733
1734
oldBounds = getBounds ();
1734
- oldBounds .width -= 4 ; // FIXME
1735
+ // oldBounds.width -= 4; // FIXME
1735
1736
}
1736
1737
//Monitor monitor = getMonitor();
1737
1738
int height = monitor .clientHeight ;
You can’t perform that action at this time.
0 commit comments