private Element errorIndicatorElement;
- private final Element captionElement = DOM.createSpan();
+ private final Element captionElement = DOM.createAnchor();
private Icon icon;
if (uidl.hasAttribute("name")) {
target = uidl.getStringAttribute("name");
+ captionElement.setAttribute("target", target);
}
if (uidl.hasAttribute("src")) {
src = client.translateToolkitUri(uidl.getStringAttribute("src"));
+ captionElement.setAttribute("href", src);
}
if (uidl.hasAttribute("border")) {
+ targetHeight;
}
- Window.open(src, target, features);
+ if (features.length() > 0) {
+ // if 'special features' are set, use window.open(), unless
+ // a modifier key is held (ctrl to open in new tab etc)
+ Event e = DOM.eventGetCurrentEvent();
+ if (!e.getCtrlKey() && !e.getAltKey() && !e.getShiftKey()
+ && !e.getMetaKey()) {
+ Window.open(src, target, features);
+ e.preventDefault();
+ }
+ }
}
}