Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render(callback?): this {
const context = this;
const isVisible = this._popup.popupState();
Button.prototype.render.call(context, function (widget) {
const popupParentWidgetBBox = context._popupParentWidget.getBBox();
const bbox = widget.getBBox();
context._popup
.left(bbox.x - popupParentWidgetBBox.x + bbox.width - context._popup.width())
.top(bbox.y - popupParentWidgetBBox.y + bbox.height)
.visible(isVisible && context.autoClose() ? false : isVisible) // hack: closes the form when submit is clicked ---
.popupState(isVisible && context.autoClose() ? false : isVisible)
.render()
;
if (callback) {
callback(widget);
}
});
return this;
}