Changeset 4978
- Timestamp:
- 06/30/08 12:17:25 (5 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/com/itmill/toolkit/terminal/gwt/client/ui/IWindow.java
r4856 r4978 21 21 import com.google.gwt.user.client.ui.Widget; 22 22 import com.itmill.toolkit.terminal.gwt.client.ApplicationConnection; 23 import com.itmill.toolkit.terminal.gwt.client.BrowserInfo; 23 24 import com.itmill.toolkit.terminal.gwt.client.Paintable; 24 25 import com.itmill.toolkit.terminal.gwt.client.UIDL; … … 360 361 361 362 setFF2CaretFixEnabled(true); 362 363 } 364 365 private void setFF2CaretFixEnabled(boolean enable) { 366 // "missing cursor" browser bug workaround for FF2 in Windows andLinux 367 if (!Util.isFF2()) { 368 return; 369 } 370 if (enable) { 363 fixFF3OverflowBug(); 364 } 365 366 /** Disable overflow auto with FF3 to fix #1837. */ 367 private void fixFF3OverflowBug() { 368 if (BrowserInfo.get().isFF3()) { 371 369 DeferredCommand.addCommand(new Command() { 372 370 public void execute() { 373 String overflow = DOM.getStyleAttribute(getElement(), 374 "overflow"); 375 DOM.setStyleAttribute(getElement(), "overflow", "auto"); 371 DOM.setStyleAttribute(getElement(), "overflow", ""); 376 372 } 377 378 373 }); 379 } else { 380 DOM.setStyleAttribute(getElement(), "overflow", ""); 381 } 382 374 } 375 } 376 377 /** 378 * Fix "missing cursor" browser bug workaround for FF2 in Windows and Linux. 379 * 380 * Calling this method has no effect on other browsers than the ones based 381 * on Gecko 1.8 382 * 383 * @param enable 384 */ 385 private void setFF2CaretFixEnabled(boolean enable) { 386 if (BrowserInfo.get().isFF2()) { 387 if (enable) { 388 DeferredCommand.addCommand(new Command() { 389 public void execute() { 390 DOM.setStyleAttribute(getElement(), "overflow", "auto"); 391 } 392 }); 393 } else { 394 DOM.setStyleAttribute(getElement(), "overflow", ""); 395 } 396 } 383 397 } 384 398
