This repository was archived by the owner on Jul 22, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
assets/javascripts/discourse/connectors/post-text-buttons Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -115,15 +115,9 @@ export default class AiPostHelperTrigger extends Component {
115115
116116 @action
117117 async showAiPostHelperMenu () {
118- const existingRect = this .currentMenu .trigger .rect ;
119- const virtualElement = {
120- getBoundingClientRect : () => existingRect,
121- getClientRects : () => [existingRect],
122- };
123-
124118 await this .currentMenu .close ();
125119
126- await this .menu .show (virtualElement , {
120+ await this .menu .show (this . currentMenu . trigger , {
127121 identifier: " ai-post-helper-menu" ,
128122 component: AiPostHelperMenu,
129123 interactive: true ,
@@ -133,12 +127,14 @@ export default class AiPostHelperTrigger extends Component {
133127 data: this .menuData ,
134128 placement: " top-start" ,
135129 fallbackPlacements: [" bottom-start" ],
136- inline : true ,
130+ updateOnScroll : false ,
137131 onClose : () => {
138132 this .removeHighlightedText ();
139133 },
140134 });
141135
136+ await this .currentMenu .destroy ();
137+
142138 this .highlightSelectedText ();
143139 }
144140
You can’t perform that action at this time.
0 commit comments