A platform for community discussion. Free, open, simple.
REVERT: partly revert change to ensure context is the same (#10012)
Joffrey JAFFEUX8fe074430bda
diff --git a/app/assets/javascripts/discourse/app/widgets/widget.js b/app/assets/javascripts/discourse/app/widgets/widget.jsindex 378035ab7be..ad54150b33b 100644--- a/app/assets/javascripts/discourse/app/widgets/widget.js+++ b/app/assets/javascripts/discourse/app/widgets/widget.js@@ -336,12 +336,12 @@ export default class Widget {sendWidgetAction(name, param) {return this.rerenderResult(() => {- const widgetFunction = this.callWidgetFunction(name, param);+ const widget = this._findAncestorWithProperty(name);+ if (widget) {+ return widget[name].call(widget, param);+ }- return (- widgetFunction ||- this._sendComponentAction(name, param || this.findAncestorModel())- );+ return this._sendComponentAction(name, param || this.findAncestorModel());});}