REVERT: partly revert change to ensure context is the same (#10012)

REVERT: partly revert change to ensure context is the same (#10012)

diff --git a/app/assets/javascripts/discourse/app/widgets/widget.js b/app/assets/javascripts/discourse/app/widgets/widget.js
index 378035a..ad54150 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());
     });
   }
 

GitHub sha: 8fe07443

This commit appears in #10012 which was merged by jjaffeux.