FIX: uses getByIdentifier of d-menu (#611)
The menu service doesn’t implement an activeMenu property anymore as it can now support concurrent menus. The solution to this is to use `getByIdentifier`.
This commit is contained in:
parent
61890b667c
commit
64f41454ad
|
@ -1,3 +1,4 @@
|
||||||
|
< 3.3.0.beta2-dev: 61890b667c06299841ae88946f84a112f00060e1
|
||||||
< 3.3.0.beta1-dev: a65c4076a63104b61d213534db7f89aa3c8acd9e
|
< 3.3.0.beta1-dev: a65c4076a63104b61d213534db7f89aa3c8acd9e
|
||||||
< 3.2.0.beta5-dev: c70f43f130fb98e4a1adb1afd9b621aaa49088e3
|
< 3.2.0.beta5-dev: c70f43f130fb98e4a1adb1afd9b621aaa49088e3
|
||||||
< 3.2.0.beta4-dev: 493b48477a9288f2f1b6f021954088705a6673d6
|
< 3.2.0.beta4-dev: 493b48477a9288f2f1b6f021954088705a6673d6
|
||||||
|
|
|
@ -198,7 +198,11 @@ export default class AIHelperOptionsMenu extends Component {
|
||||||
|
|
||||||
if (option.name === "explain") {
|
if (option.name === "explain") {
|
||||||
this.menuState = this.MENU_STATES.result;
|
this.menuState = this.MENU_STATES.result;
|
||||||
this.menu.activeMenu.options.placement = "bottom";
|
|
||||||
|
const menu = this.menu.getByIdentifier("post-text-selection-toolbar");
|
||||||
|
if (menu) {
|
||||||
|
menu.options.placement = "bottom";
|
||||||
|
}
|
||||||
|
|
||||||
const fetchUrl = `/discourse-ai/ai-helper/explain`;
|
const fetchUrl = `/discourse-ai/ai-helper/explain`;
|
||||||
this._activeAIRequest = ajax(fetchUrl, {
|
this._activeAIRequest = ajax(fetchUrl, {
|
||||||
|
|
Loading…
Reference in New Issue