|
|
@@ -16,7 +16,9 @@ |
|
|
|
|
|
|
|
package com.vaadin.client.ui; |
|
|
|
|
|
|
|
import com.google.gwt.core.client.Scheduler; |
|
|
|
import com.google.gwt.dom.client.Element; |
|
|
|
import com.google.gwt.dom.client.Style.Visibility; |
|
|
|
import com.google.gwt.user.client.DOM; |
|
|
|
import com.google.gwt.user.client.Event; |
|
|
|
import com.vaadin.client.ApplicationConnection; |
|
|
@@ -116,4 +118,21 @@ public class VCheckBox extends com.google.gwt.user.client.ui.CheckBox |
|
|
|
errorIndicatorElement = null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
protected void onAttach() { |
|
|
|
super.onAttach(); |
|
|
|
|
|
|
|
if (BrowserInfo.get().isSafari()) { |
|
|
|
/* |
|
|
|
* Sometimes Safari does not render checkbox correctly when |
|
|
|
* attaching. Setting the visibility to hidden and a bit later |
|
|
|
* restoring will make everything just fine. |
|
|
|
*/ |
|
|
|
getElement().getStyle().setVisibility(Visibility.HIDDEN); |
|
|
|
Scheduler.get().scheduleFinally(() -> { |
|
|
|
getElement().getStyle().setVisibility(Visibility.VISIBLE); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |