if (pe.getTypeInt() == Event.ONMOUSEDOWN && getElement().isOrHasChild(t)
&& (t.findParent("." + CommonStyles.get().ignore(), -1) == null)) {
if (blink && !blinking) {
blinking = true;
pe.cancel();
Fx fx = new Fx();
fx.addAfterAnimateHandler(new AfterAnimateHandler() {
@Override
public void onAfterAnimate(AfterAnimateEvent event) {
blinking = false;
if (component != null) {
// component can be null if the preview goes off just before the panel hides
component.focus();
}
}
});
if (component.getShadow()) {
MultiEffect effect = new MultiEffect();
effect.addEffects(new Blink(component.getElement(), 50), new Blink(component.layer.getShadow(), 50));
fx.run(500, effect);
} else {
fx.run(500, new Blink(component.getElement(), 50));
}
} else if (!blink) {
pe.cancel();
component.focus();
}